Update chrome.js

This commit is contained in:
Namhyeon Go 2021-07-30 03:28:22 +09:00 committed by GitHub
parent 297a116923
commit 2b5a4ad0ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -497,6 +497,10 @@ var ChromeObject = function() {
return page.url;
};
this.getCurrentDomain = function() {
return this.getEvaluatedValue('document.domain');
};
this.triggerEvent = function(eventName, selector) {
return this.evaluate('document.querySelector("' + selector + '").dispatchEvent(new Event("' + eventName + '"))');
};