Created
September 14, 2017 15:47
-
-
Save umaar/ebc170660f15aa894fa4880f4b76e77d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const devtools = new WebSocket('ws://localhost:9222/devtools/page/69990451-aaab-4ef8-87b1-ea77b8101b2a'); | |
devtools.onmessage = ({data}) => { | |
const {result: {result: {value}}} = JSON.parse(data); | |
console.log('WebSocket Message Received: ', value) | |
}; | |
devtools.send(JSON.stringify({ | |
id: 1, | |
method: 'Runtime.evaluate', | |
params: { | |
expression: `'The current URL is: ' + location.href` | |
} | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi , Could you help me how to change the iframe using the websocket remote debug?