B2G/gecko/browser/devtools/webconsole/webconsole.js
/**
   * Position the console in a different location.
   *
   * Note: you do not usually call this method. This is called by the WebConsole
   * instance that owns this iframe. You need to call this if you write
   * a different owner or you manually reposition the iframe.
   *
   * @param string aPosition
   *        The new Web Console iframe location: "above" (the page), "below" or
   *        "window".
   * @param object aNewWindow
   *        Repositioning causes the iframe to reload - bug 254144. You need to
   *        provide the new window object so we can reinitialize the UI as
   *        needed.
   */
Position the console in a different location.
Note: you do not usually call this method. This is called by the WebConsole
instance that owns this iframe. You need to call this if you write
a different owner or you manually reposition the iframe.


Position the console in a different location . Note : you do not usually call this method . This is called by the WebConsole instance that owns this iframe . You need to call this if you write a different owner or you manually reposition the iframe .
function WCF_positionConsole(aPosition, aNewWindow)
  {
    this.window = aNewWindow;
    this.document = this.window.document;
    this.rootElement = this.document.documentElement;
    this.window.controllers.insertControllerAt(0, this._commandController);
    let oldOutputNode = this.outputNode;
    this._initUI();
    this.jsterm && this.jsterm._initUI();
    this.closeButton.hidden = aPosition == "window";
    this.positionMenuitems[aPosition].setAttribute("checked", true);
    if (this.positionMenuitems.last) {
      this.positionMenuitems.last.setAttribute("checked", false);
    }
    this.positionMenuitems.last = this.positionMenuitems[aPosition];
    if (oldOutputNode && oldOutputNode.childNodes.length) {
      let parentNode = this.outputNode.parentNode;
      parentNode.replaceChild(oldOutputNode, this.outputNode);
      this.outputNode = oldOutputNode;
    }
    this.jsterm && this.jsterm.inputNode.focus();
  }
function WCF_positionConsole ( aPosition , aNewWindow ) { this . window = aNewWindow ; this . document = this . window . document ; this . rootElement = this . document . documentElement ; this . window . controllers . insertControllerAt ( 0 , this . _commandController ) ; let oldOutputNode = this . outputNode ; this . _initUI ( ) ; this . jsterm && this . jsterm . _initUI ( ) ; this . closeButton . hidden = aPosition == "window" ; this . positionMenuitems [ aPosition ] . setAttribute ( "checked" , true ) ; if ( this . positionMenuitems . last ) { this . positionMenuitems . last . setAttribute ( "checked" , false ) ; } this . positionMenuitems . last = this . positionMenuitems [ aPosition ] ; if ( oldOutputNode && oldOutputNode . childNodes . length ) { let parentNode = this . outputNode . parentNode ; parentNode . replaceChild ( oldOutputNode , this . outputNode ) ; this . outputNode = oldOutputNode ; } this . jsterm && this . jsterm . inputNode . focus ( ) ; }
Position the console in a different location.
Position the console in a different location .
// register the controller to handle "select all" properly