Bug 1291049 - Fix the markup frame load to work in other browsers
MozReview-Commit-ID: 4obAqJVWcU7
--- a/devtools/client/inspector/inspector.js
+++ b/devtools/client/inspector/inspector.js
@@ -1317,21 +1317,21 @@ Inspector.prototype = {
this._markupBox = doc.getElementById("markup-box");
// create tool iframe
this._markupFrame = doc.createElement("iframe");
this._markupFrame.setAttribute("flex", "1");
this._markupFrame.setAttribute("tooltip", "aHTMLTooltip");
this._markupFrame.addEventListener("contextmenu", this._onContextMenu);
+ this._markupBox.setAttribute("collapsed", true);
+ this._markupBox.appendChild(this._markupFrame);
+
// This is needed to enable tooltips inside the iframe document.
this._markupFrame.addEventListener("load", this._onMarkupFrameLoad, true);
-
- this._markupBox.setAttribute("collapsed", true);
- this._markupBox.appendChild(this._markupFrame);
this._markupFrame.setAttribute("src", "markup/markup.xhtml");
this._markupFrame.setAttribute("aria-label",
INSPECTOR_L10N.getStr("inspector.panelLabel.markupView"));
},
_onMarkupFrameLoad: function () {
this._markupFrame.removeEventListener("load", this._onMarkupFrameLoad, true);