Last active
August 29, 2015 14:01
-
-
Save fernyb/4caec5950d95998ab5a4 to your computer and use it in GitHub Desktop.
Remote Debugging Protocol
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
# View the messages sent to the websocket | |
# https://developers.google.com/chrome-developer-tools/docs/debugger-protocol | |
# | |
_old_send = function(msg) { console.log(msg); console.log(" "); WebInspector.socket.send(msg); }; | |
InspectorFrontendHost.sendMessageToBackend = _old_send; | |
WebInspector.socket.onmessage = function(message) { console.log(message.data); console.log(" "); InspectorBackend.dispatch(message.data); }; | |
Sent: | |
{"method":"Runtime.evaluate","params":{"expression":"document.location.href","objectGroup":"console","includeCommandLineAPI":true,"doNotPauseOnExceptions":false,"frameId":"0.1","returnByValue":false},"id":150} | |
Result: | |
{"result":{"result":{"type":"string","value":"http://stage-www.yellowpages.com/"},"wasThrown":false},"id":150} | |
InspectorFrontendHost.sendMessageToBackend("{\"method\":\"Runtime.evaluate\", \"params\":{\"expression\":\"window.getComputedStyle(btns[0], null).getPropertyValue('display')\"}, \"id\":365, \"returnByValue\":false}") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment