mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-18 15:41:05 +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.sendPageRPC = function(method, params) {
|
||||||
this.ws.send("ws://localhost:" + this.debuggingPort + "/devtools/page/" + this.pageId, JSON.stringify({
|
if (this.pageId != "") {
|
||||||
"id": this.pageEventId,
|
this.ws.send("ws://localhost:" + this.debuggingPort + "/devtools/page/" + this.pageId, JSON.stringify({
|
||||||
"method": method,
|
"id": this.pageEventId,
|
||||||
"params": params
|
"method": method,
|
||||||
}));
|
"params": params
|
||||||
this.pageEventId++;
|
}));
|
||||||
|
this.pageEventId++;
|
||||||
|
console.info("ChromeObject().sendPageRPC() -> Sent");
|
||||||
|
} else {
|
||||||
|
console.error("pageId not specified");
|
||||||
|
}
|
||||||
|
|
||||||
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.navigate = function(url) {
|
this.navigate = function(url) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user