mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 07:21:43 +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 = "";
|
||||
isActivate = (typeof isActivate === "undefined" ? false : isActivate);
|
||||
|
||||
if (this.debuggingPort > 0) {
|
||||
try {
|
||||
|
@ -559,9 +560,13 @@ var ChromeObject = function() {
|
|||
title = this._focus();
|
||||
|
||||
// find window by title
|
||||
var pageList = this.getPageList();
|
||||
if (pageList.length > 0) {
|
||||
this.oAutoIt.callFunction("WinActivate", [title]);
|
||||
if (isActivate) {
|
||||
var pageList = this.getPageList();
|
||||
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) {
|
||||
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.global = global;
|
||||
exports.require = global.require;
|
||||
|
|
Loading…
Reference in New Issue
Block a user