Bug 1453783 - Patch to test switching from browserconsole.xul to webconsole.html
MozReview-Commit-ID: BiluNAOXxsv
--- 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);