mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-03-12 08:55:14 +00:00
Update chrome.js
This commit is contained in:
parent
54e895b6c2
commit
331578452f
|
@ -223,12 +223,19 @@ var ChromeObject = function() {
|
|||
};
|
||||
|
||||
this.sendPageRPC = function(method, params) {
|
||||
this.ws.send("ws://localhost:" + this.debuggingPort + "/devtools/page/" + this.pageId, JSON.stringify({
|
||||
"id": this.pageEventId,
|
||||
"method": method,
|
||||
"params": params
|
||||
}));
|
||||
this.pageEventId++;
|
||||
if (this.pageId != "") {
|
||||
this.ws.send("ws://localhost:" + this.debuggingPort + "/devtools/page/" + this.pageId, JSON.stringify({
|
||||
"id": this.pageEventId,
|
||||
"method": method,
|
||||
"params": params
|
||||
}));
|
||||
this.pageEventId++;
|
||||
console.info("ChromeObject().sendPageRPC() -> Sent");
|
||||
} else {
|
||||
console.error("pageId not specified");
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
this.navigate = function(url) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user