B2G/gecko/browser/devtools/debugger/debugger-view.js
/**
   * Sets the specific grip for a variable.
   * The grip should contain the value or the type & class, as defined in the
   * remote debugger protocol. For convenience, undefined and null are
   * both considered types.
   *
   * @param object aVar
   *        The parent variable element.
   * @param object aGrip
   *        The primitive or object defining the grip, specifying
   *        the value and/or type & class of the variable (if the type
   *        is not specified, it will be inferred from the value).
   *        e.g. 42
   *             true
   *             "nasu"
   *             { type: "undefined" }
   *             { type: "null" }
   *             { type: "object", class: "Object" }
   * @return object
   *         The same variable.
   */
Sets the specific grip for a variable.
The grip should contain the value or the type & class, as defined in the
remote debugger protocol. For convenience, undefined and null are
both considered types.

@param object aVar
The parent variable element.
@param object aGrip
The primitive or object defining the grip, specifying
the value and/or type & class of the variable (if the type
is not specified, it will be inferred from the value).
Sets the specific grip for a variable . The grip should contain the value or the type & class as defined in the remote debugger protocol . For convenience undefined and null are both considered types . @param object aVar The parent variable element . @param object aGrip The primitive or object defining the grip specifying the value and / or type & class of the variable ( if the type is not specified it will be inferred from the value ) .
function DVP__setGrip(aVar, aGrip) {
    if (!aVar) {
      return null;
    }
    if (aGrip === undefined) {
      aGrip = { type: "undefined" };
    }
    if (aGrip === null) {
      aGrip = { type: "null" };
    }
    let valueLabel = aVar.getElementsByClassName("value")[0];
    if (!valueLabel) {
      return null;
    }
    this._applyGrip(valueLabel, aGrip);
    return aVar;
  }
function DVP__setGrip ( aVar , aGrip ) { if ( ! aVar ) { return null ; } if ( aGrip === undefined ) { aGrip = { type : "undefined" } ; } if ( aGrip === null ) { aGrip = { type : "null" } ; } let valueLabel = aVar . getElementsByClassName ( "value" ) [ 0 ] ; if ( ! valueLabel ) { return null ; } this . _applyGrip ( valueLabel , aGrip ) ; return aVar ; }
Sets the specific grip for a variable.
Sets the specific grip for a variable .
// Make sure the variable container exists. // Make sure the value node exists.