Update chrome.js

This commit is contained in:
Namhyeon Go 2024-09-02 20:51:28 +09:00 committed by GitHub
parent c6d55cd1fa
commit eb389d34c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -687,14 +687,15 @@ var ChromeObject = function() {
}; };
this.setTitle = function(title) { this.setTitle = function(title) {
var i = 0, repeat = 2; if (!(this.debuggingPort > 0))
return;
if (this.debuggingPort > 0) { var i = 0, k = 5;
while (i < repeat) { while (i < k && title != this.getTitle()) {
sleep(1000);
this.evaluate('document.title = ' + this.__escape(title)); this.evaluate('document.title = ' + this.__escape(title));
i++; i++;
} }
}
}; };
this.getTitle = function() { this.getTitle = function() {