B2G/gecko/browser/devtools/debugger/debugger-view.js
/**
   * Adds a scope to contain any inspected variables.
   * If the optional id is not specified, the scope html node will have a
   * default id set as aName-scope.
   *
   * @param string aName
   *        The scope name (e.g. "Local", "Global" or "With block").
   * @param string aId
   *        Optional, an id for the scope html node.
   * @return object
   *         The newly created html node representing the added scope or null
   *         if a node was not created.
   */
Adds a scope to contain any inspected variables.
If the optional id is not specified, the scope html node will have a
default id set as aName-scope.

@param string aName
The scope name .
@param string aId
Optional, an id for the scope html node.
@return object
The newly created html node representing the added scope or null
if a node was not created.
Adds a scope to contain any inspected variables . If the optional id is not specified the scope html node will have a default id set as aName - scope . @param string aName The scope name . @param string aId Optional an id for the scope html node . @return object The newly created html node representing the added scope or null if a node was not created .
function DVP__addScope(aName, aId) {
    if (!this._vars) {
      return null;
    }
    aId = aId || aName.toLowerCase().trim().replace(/\s+/g, "-") + this._idCount++;
    let element = this._createPropertyElement(aName, aId, "scope", this._vars);
    if (!element) {
      return null;
    }
    element._identifier = aName;
    element.addVar = this._addVar.bind(this, element);
    element.addToHierarchy = this.addScopeToHierarchy.bind(this, element);
    element.refresh(function() {
      let title = element.getElementsByClassName("title")[0];
      title.classList.add("devtools-toolbar");
    }.bind(this));
    return element;
  }
function DVP__addScope ( aName , aId ) { if ( ! this . _vars ) { return null ; } aId = aId || aName . toLowerCase ( ) . trim ( ) . replace ( / \s+ / g , "-" ) + this . _idCount ++ ; let element = this . _createPropertyElement ( aName , aId , "scope" , this . _vars ) ; if ( ! element ) { return null ; } element . _identifier = aName ; element . addVar = this . _addVar . bind ( this , element ) ; element . addToHierarchy = this . addScopeToHierarchy . bind ( this , element ) ; element . refresh ( function ( ) { let title = element . getElementsByClassName ( "title" ) [ 0 ] ; title . classList . add ( "devtools-toolbar" ) ; } . bind ( this ) ) ; return element ; }
Adds a scope to contain any inspected variables.
Adds a scope to contain any inspected variables .
// Make sure the parent container exists. // Generate a unique id for the element, if not specified. // Contains generic nodes and functionality. // Make sure the element was created successfully. /**
     * @see DebuggerView.Properties._addVar
     */ /**
     * @see DebuggerView.Properties.addScopeToHierarchy
     */ // Setup the additional elements specific for a scope node. // Return the element for later use if necessary.