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) {
var i = 0, repeat = 2;
if (!(this.debuggingPort > 0))
return;
if (this.debuggingPort > 0) {
while (i < repeat) {
var i = 0, k = 5;
while (i < k && title != this.getTitle()) {
sleep(1000);
this.evaluate('document.title = ' + this.__escape(title));
i++;
}
}
};
this.getTitle = function() {