Skip to content

Instantly share code, notes, and snippets.

@boucher
Created September 29, 2010 06:31
Show Gist options
  • Save boucher/602362 to your computer and use it in GitHub Desktop.
Save boucher/602362 to your computer and use it in GitHub Desktop.
WebInspector.loaded = function()
{
if ("page" in WebInspector.queryParamsObject) {
WebInspector.socket = new WebSocket("ws://" + window.location.host + "/devtools/page/" + WebInspector.queryParamsObject.page);
WebInspector.socket.onmessage = function(message) { WebInspector_syncDispatch(message.data); }
WebInspector.socket.onerror = function(error) { console.error(error); }
WebInspector.socket.onopen = function() {
InspectorFrontendHost.sendMessageToBackend = WebInspector.socket.send.bind(WebInspector.socket);
InspectorFrontendHost.loaded = WebInspector.socket.send.bind(WebInspector.socket, "loaded");
WebInspector.doLoadedDone();
}
return;
}
WebInspector.doLoadedDone();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment