B2G/gecko/browser/devtools/webconsole/HUDService.jsm
/**
   * Common code that needs to execute before the Web Console is repositioned.
   * @private
   * @param string aPosition
   *        The new position: "above", "below" or "window".
   * @param number aLastIndex
   *        The last visible message in the console output before repositioning
   *        occurred.
   */
Common code that needs to execute before the Web Console is repositioned.
Common code that needs to execute before the Web Console is repositioned .
function WC__beforePositionConsole(aPosition, aLastIndex)
  {
    if (!this.ui) {
      return;
    }
    let onLoad = function() {
      this.iframe.removeEventListener("load", onLoad, true);
      this.iframeWindow = this.iframe.contentWindow.wrappedJSObject;
      this.ui.positionConsole(aPosition, this.iframeWindow);
      if (aLastIndex > -1 && aLastIndex < this.outputNode.getRowCount()) {
        this.outputNode.ensureIndexIsVisible(aLastIndex);
      }
      this._currentUIPosition = aPosition;
      Services.prefs.setCharPref("devtools.webconsole.position", aPosition);
    }.bind(this);
    this.iframe.addEventListener("load", onLoad, true);
  }
function WC__beforePositionConsole ( aPosition , aLastIndex ) { if ( ! this . ui ) { return ; } let onLoad = function ( ) { this . iframe . removeEventListener ( "load" , onLoad , true ) ; this . iframeWindow = this . iframe . contentWindow . wrappedJSObject ; this . ui . positionConsole ( aPosition , this . iframeWindow ) ; if ( aLastIndex > - 1 && aLastIndex < this . outputNode . getRowCount ( ) ) { this . outputNode . ensureIndexIsVisible ( aLastIndex ) ; } this . _currentUIPosition = aPosition ; Services . prefs . setCharPref ( "devtools.webconsole.position" , aPosition ) ; } . bind ( this ) ; this . iframe . addEventListener ( "load" , onLoad , true ) ; }
Common code that needs to execute before the Web Console is repositioned.
Common code that needs to execute before the Web Console is repositioned .