mirror of
				https://github.com/gnh1201/welsonjs.git
				synced 2025-10-31 04:51:17 +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({ | 		this.ws.send("ws://localhost:" + this.debuggingPort + "/devtools/page/" + this.pageId, JSON.stringify({ | ||||||
| 			"id": this.pageEventId, | 			"id": this.pageEventId, | ||||||
| 			"method": method, | 			"method": method, | ||||||
|  | @ -232,13 +232,15 @@ var ChromeObject = function() { | ||||||
| 	}; | 	}; | ||||||
| 
 | 
 | ||||||
| 	this.navigate = function(url) { | 	this.navigate = function(url) { | ||||||
| 		return this.sendRPC("Page.navigate", { | 		return this.sendPageRPC("Page.navigate", { | ||||||
| 			"url": url | 			"url": url | ||||||
| 		}); | 		}); | ||||||
| 	}; | 	}; | ||||||
| 
 | 
 | ||||||
| 	this.evaluate = function(code) { | 	this.evaluate = function(expression) { | ||||||
| 		// todo
 | 		return this.sendPageRPC("Runtime.evaluate", { | ||||||
|  | 			"expression": expression | ||||||
|  | 		}); | ||||||
| 	}; | 	}; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 GitHub
							GitHub