Bug 1291049 - Fix the markup frame load to work in other browsers draft
authorJulian Descottes <jdescottes@mozilla.com>
Wed, 12 Oct 2016 09:05:16 +0200
changeset 424225 6dd0f8b7bce0ea44e02e573941c157d8ace5bccf
parent 424224 205e2aadefad100a46cc2be5e983922e0d77fce2
child 533620 6dd1b1f771f6dada2dafb7de28030630965f4cda
push id32097
push userjdescottes@mozilla.com
push dateWed, 12 Oct 2016 10:38:17 +0000
bugs1291049
milestone52.0a1
Bug 1291049 - Fix the markup frame load to work in other browsers MozReview-Commit-ID: 4obAqJVWcU7
devtools/client/inspector/inspector.js
--- 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);