B2G/gecko/browser/devtools/styleinspector/test/head.js
/**
   * Factory method to create the actual style panel
   * @param {function} aCallback (optional) callback to fire when ready.
   */
Factory method to create the actual style panel
@param {function} aCallback (optional) callback to fire when ready.
Factory method to create the actual style panel @param { function } aCallback ( optional ) callback to fire when ready .
function SI_createPanel(aSelection, aCallback)
  {
    let popupSet = this.document.getElementById("mainPopupSet");
    let panel = this.document.createElement("panel");
    panel.setAttribute("class", "styleInspector");
    panel.setAttribute("orient", "vertical");
    panel.setAttribute("ignorekeys", "true");
    panel.setAttribute("noautofocus", "true");
    panel.setAttribute("noautohide", "true");
    panel.setAttribute("titlebar", "normal");
    panel.setAttribute("close", "true");
    panel.setAttribute("label", "Computed View");
    panel.setAttribute("width", 350);
    panel.setAttribute("height", this.window.screen.height / 2);
    this._openCallback = aCallback;
    this.selectedNode = aSelection;
    let iframe = this.document.createElement("iframe");
    let boundIframeOnLoad = function loadedInitializeIframe()
    {
      this.iframeReady = true;
      this.iframe.removeEventListener("load", boundIframeOnLoad, true);
      this.panel.openPopup(this.window.gBrowser.selectedBrowser, "end_before", 0, 0, false, false);
    }.bind(this);
    iframe.flex = 1;
    iframe.setAttribute("tooltip", "aHTMLTooltip");
    iframe.addEventListener("load", boundIframeOnLoad, true);
    iframe.setAttribute("src", "chrome://browser/content/devtools/csshtmltree.xul");
    panel.appendChild(iframe);
    popupSet.appendChild(panel);
    this._boundPopupShown = this.popupShown.bind(this);
    panel.addEventListener("popupshown", this._boundPopupShown, false);
    this.panel = panel;
    this.iframe = iframe;
    return panel;
  }
function SI_createPanel ( aSelection , aCallback ) { let popupSet = this . document . getElementById ( "mainPopupSet" ) ; let panel = this . document . createElement ( "panel" ) ; panel . setAttribute ( "class" , "styleInspector" ) ; panel . setAttribute ( "orient" , "vertical" ) ; panel . setAttribute ( "ignorekeys" , "true" ) ; panel . setAttribute ( "noautofocus" , "true" ) ; panel . setAttribute ( "noautohide" , "true" ) ; panel . setAttribute ( "titlebar" , "normal" ) ; panel . setAttribute ( "close" , "true" ) ; panel . setAttribute ( "label" , "Computed View" ) ; panel . setAttribute ( "width" , 350 ) ; panel . setAttribute ( "height" , this . window . screen . height / 2 ) ; this . _openCallback = aCallback ; this . selectedNode = aSelection ; let iframe = this . document . createElement ( "iframe" ) ; let boundIframeOnLoad = function loadedInitializeIframe ( ) { this . iframeReady = true ; this . iframe . removeEventListener ( "load" , boundIframeOnLoad , true ) ; this . panel . openPopup ( this . window . gBrowser . selectedBrowser , "end_before" , 0 , 0 , false , false ) ; } . bind ( this ) ; iframe . flex = 1 ; iframe . setAttribute ( "tooltip" , "aHTMLTooltip" ) ; iframe . addEventListener ( "load" , boundIframeOnLoad , true ) ; iframe . setAttribute ( "src" , "chrome://browser/content/devtools/csshtmltree.xul" ) ; panel . appendChild ( iframe ) ; popupSet . appendChild ( panel ) ; this . _boundPopupShown = this . popupShown . bind ( this ) ; panel . addEventListener ( "popupshown" , this . _boundPopupShown , false ) ; this . panel = panel ; this . iframe = iframe ; return panel ; }
Factory method to create the actual style panel
 @param {function} aCallback (optional) callback to fire when ready.
Factory method to create the actual style panel @param { function } aCallback ( optional ) callback to fire when ready .