Bug 1453783 - Patch to test switching from browserconsole.xul to webconsole.html draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Mon, 16 Apr 2018 11:38:42 -0700
changeset 783177 79e794b01feb
parent 782895 6276ec7ebbf3
push id106633
push userbgrinstead@mozilla.com
push dateMon, 16 Apr 2018 18:38:52 +0000
bugs1453783
milestone61.0a1
Bug 1453783 - Patch to test switching from browserconsole.xul to webconsole.html MozReview-Commit-ID: BiluNAOXxsv
devtools/client/definitions.js
devtools/client/webconsole/hudservice.js
--- a/devtools/client/definitions.js
+++ b/devtools/client/definitions.js
@@ -95,17 +95,17 @@ Tools.inspector = {
     return new InspectorPanel(iframeWindow, toolbox);
   }
 };
 Tools.webConsole = {
   id: "webconsole",
   accesskey: l10n("webConsoleCmd.accesskey"),
   ordinal: 2,
   url: "chrome://devtools/content/webconsole/webconsole.html",
-  browserConsoleURL: "chrome://devtools/content/webconsole/browserconsole.xul",
+  browserConsoleURL: "chrome://devtools/content/webconsole/webconsole.html",
   icon: "chrome://devtools/skin/images/tool-webconsole.svg",
   label: l10n("ToolboxTabWebconsole.label"),
   menuLabel: l10n("MenuWebconsole.label"),
   panelLabel: l10n("ToolboxWebConsole.panelLabel"),
   get tooltip() {
     return l10n("ToolboxWebconsole.tooltip2",
     (osString == "Darwin" ? "Cmd+Opt+" : "Ctrl+Shift+") +
     l10n("webconsole.commandkey"));
--- a/devtools/client/webconsole/hudservice.js
+++ b/devtools/client/webconsole/hudservice.js
@@ -187,22 +187,17 @@ HUD_SERVICE.prototype =
       let win = Services.ww.openWindow(null, browserConsoleURL, "_blank",
                                        BC_WINDOW_FEATURES, null);
       await new Promise(resolve => {
         win.addEventListener("DOMContentLoaded", resolve, {once: true});
       });
 
       win.document.title = l10n.getStr("browserConsole.title");
 
-      let iframe = win.document.querySelector("iframe");
-      await new Promise(resolve => {
-        iframe.addEventListener("DOMContentLoaded", resolve, {once: true});
-      });
-
-      return {iframeWindow: iframe.contentWindow, chromeWindow: win};
+      return {iframeWindow: win, chromeWindow: win};
     }
 
     // Temporarily cache the async startup sequence so that if toggleBrowserConsole
     // gets called again we can return this console instead of opening another one.
     this._browserConsoleInitializing = (async () => {
       let connection = await connect();
       let target = await TargetFactory.forRemoteTab(connection);
       let {iframeWindow, chromeWindow} = await openWindow(target);