Update chrome.js

This commit is contained in:
Namhyeon Go 2022-01-08 23:24:43 +09:00 committed by GitHub
parent 60458ee5f3
commit 731bd225ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,8 @@ var AutoItX = require("lib/autoitx");
var pageEventId = 0;
var ChromeObject = function() {
STD.EventableObject.apply(this, arguments); // set this object to `eventable`
this.workingDirectory = SYS.getEnvString("PROGRAMFILES") + "\\Google\\Chrome\\Application";
this.binPath = SYS.getEnvString("PROGRAMFILES") + "\\Google\\:installedDir\\Application\\chrome.exe";
//this.processID = 0;
@ -472,6 +474,9 @@ var ChromeObject = function() {
}
}
// calling `onfocus` event
this.dispatchEvent(new STD.Event("focus"));
return title;
};
@ -1048,6 +1053,8 @@ var ChromeObject = function() {
this.create();
};
ChromeObject.prototype = new STD.EventableObject();
ChromeObject.prototype.constructor = ChromeObject;
exports.create = function(profileName) {
return (new ChromeObject()).setProfile(profileName, null);