mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-07 12:16:04 +00:00
Update chrome.js
This commit is contained in:
parent
34115728fe
commit
87d785df45
|
@ -545,8 +545,9 @@ var ChromeObject = function() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.focus = function() {
|
this.focus = function(isActivate) {
|
||||||
var title = "";
|
var title = "";
|
||||||
|
isActivate = (typeof isActivate === "undefined" ? false : isActivate);
|
||||||
|
|
||||||
if (this.debuggingPort > 0) {
|
if (this.debuggingPort > 0) {
|
||||||
try {
|
try {
|
||||||
|
@ -559,9 +560,13 @@ var ChromeObject = function() {
|
||||||
title = this._focus();
|
title = this._focus();
|
||||||
|
|
||||||
// find window by title
|
// find window by title
|
||||||
var pageList = this.getPageList();
|
if (isActivate) {
|
||||||
if (pageList.length > 0) {
|
var pageList = this.getPageList();
|
||||||
this.oAutoIt.callFunction("WinActivate", [title]);
|
if (pageList.length > 0) {
|
||||||
|
this.oAutoIt.callFunction("WinActivate", [title]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.info("To move the window to the front, the isActivate flag must be set to true.");
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("ChromeObject.focus() ->", e.message);
|
console.error("ChromeObject.focus() ->", e.message);
|
||||||
|
@ -1414,7 +1419,7 @@ exports.startDebugInPrivate = function(url, proxy, profileName, debuggingPort, i
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.VERSIONINFO = "Chrome Web Browser Debugging Interface (chrome.js) version 0.4.12";
|
exports.VERSIONINFO = "Chrome Web Browser Debugging Interface (chrome.js) version 0.4.13";
|
||||||
exports.AUTHOR = "abuse@catswords.net";
|
exports.AUTHOR = "abuse@catswords.net";
|
||||||
exports.global = global;
|
exports.global = global;
|
||||||
exports.require = global.require;
|
exports.require = global.require;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user