mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-11 17:34:58 +00:00
Update chrome.js
This commit is contained in:
parent
fe435257f7
commit
54e895b6c2
|
@ -222,7 +222,7 @@ var ChromeObject = function() {
|
|||
});
|
||||
};
|
||||
|
||||
this.sendRPC = function(method, params) {
|
||||
this.sendPageRPC = function(method, params) {
|
||||
this.ws.send("ws://localhost:" + this.debuggingPort + "/devtools/page/" + this.pageId, JSON.stringify({
|
||||
"id": this.pageEventId,
|
||||
"method": method,
|
||||
|
@ -232,13 +232,15 @@ var ChromeObject = function() {
|
|||
};
|
||||
|
||||
this.navigate = function(url) {
|
||||
return this.sendRPC("Page.navigate", {
|
||||
return this.sendPageRPC("Page.navigate", {
|
||||
"url": url
|
||||
});
|
||||
};
|
||||
|
||||
this.evaluate = function(code) {
|
||||
// todo
|
||||
this.evaluate = function(expression) {
|
||||
return this.sendPageRPC("Runtime.evaluate", {
|
||||
"expression": expression
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user