B2G/gecko/browser/devtools/webconsole/HUDService.jsm
/**
   * Activate a HeadsUpDisplay for the given tab context.
   *
   * @param nsIDOMElement aTab
   *        The xul:tab element.
   * @param boolean aAnimated
   *        True if you want to animate the opening of the Web console.
   * @return object
   *         The new HeadsUpDisplay instance.
   */
Activate a HeadsUpDisplay for the given tab context.
@param nsIDOMElement aTab
The xul:tab element.
@param boolean aAnimated
True if you want to animate the opening of the Web console.
@return object
The new HeadsUpDisplay instance.
Activate a HeadsUpDisplay for the given tab context . @param nsIDOMElement aTab The xul : tab element . @param boolean aAnimated True if you want to animate the opening of the Web console . @return object The new HeadsUpDisplay instance .
function HS_activateHUDForContext(aTab, aAnimated)
  {
    let hudId = "hud_" + aTab.linkedPanel;
    if (hudId in this.hudReferences) {
      return this.hudReferences[hudId];
    }
    this.wakeup();
    let window = aTab.ownerDocument.defaultView;
    let gBrowser = window.gBrowser;
    gBrowser.tabContainer.addEventListener("TabClose", this.onTabClose, false);
    gBrowser.tabContainer.addEventListener("TabSelect", this.onTabSelect, false);
    window.addEventListener("unload", this.onWindowUnload, false);
    let hud = new WebConsole(aTab);
    this.hudReferences[hudId] = hud;
    if (!aAnimated || hud.consolePanel) {
      this.disableAnimation(hudId);
    }
    HeadsUpDisplayUICommands.refreshCommand();
    return hud;
  }
function HS_activateHUDForContext ( aTab , aAnimated ) { let hudId = "hud_" + aTab . linkedPanel ; if ( hudId in this . hudReferences ) { return this . hudReferences [ hudId ] ; } this . wakeup ( ) ; let window = aTab . ownerDocument . defaultView ; let gBrowser = window . gBrowser ; gBrowser . tabContainer . addEventListener ( "TabClose" , this . onTabClose , false ) ; gBrowser . tabContainer . addEventListener ( "TabSelect" , this . onTabSelect , false ) ; window . addEventListener ( "unload" , this . onWindowUnload , false ) ; let hud = new WebConsole ( aTab ) ; this . hudReferences [ hudId ] = hud ; if ( ! aAnimated || hud . consolePanel ) { this . disableAnimation ( hudId ) ; } HeadsUpDisplayUICommands . refreshCommand ( ) ; return hud ; }
Activate a HeadsUpDisplay for the given tab context.
Activate a HeadsUpDisplay for the given tab context .