diff --git a/.allow-devtools-save b/.allow-devtools-save new file mode 100644 index 0000000..e69de29 diff --git a/DevtoolsConnection.js b/DevtoolsConnection.js index 3cc4dde..f7ea885 100644 --- a/DevtoolsConnection.js +++ b/DevtoolsConnection.js @@ -14,8 +14,8 @@ function(appendFrame) { openInspector: function(debuggee) { this.debuggee = debuggee; - var inspectorElt = this.showInspectorIframe(); - this.listenDebuggee(inspectorElt.contentWindow); + this.listenDebuggee(); + this.showInspectorIframe(); }, showInspectorIframe: function() { @@ -26,14 +26,17 @@ function(appendFrame) { }, listenDebuggee: function() { - this.devtools = new RESTChannel.Connection(); + if (debug) { + console.log("DevtoolsConnection listening "); + } this.onUnload = RESTChannel.listen( - this.devtools, + window, this.sendDebuggeeSpec.bind(this) ); }, - sendDebuggeeSpec: function() { + sendDebuggeeSpec: function(connection) { + this.devtools = connection; this.devtools.putObject( 'debuggee', this.debuggee, diff --git a/devtoolsAdapter/extend.html b/devtoolsAdapter/extend.html index 7377c83..229c025 100644 --- a/devtoolsAdapter/extend.html +++ b/devtoolsAdapter/extend.html @@ -1,10 +1,11 @@ - - -