mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-15 14:11:03 +00:00
Update chrome.js
This commit is contained in:
parent
c6d55cd1fa
commit
eb389d34c7
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user