Update chrome.js
Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run

This commit is contained in:
Namhyeon Go 2024-09-04 00:41:01 +09:00 committed by GitHub
parent 34115728fe
commit 87d785df45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;