B2G/gecko/browser/devtools/webconsole/PropertyPanel.jsm
/**
   * Use this setter to update the content of the tree.
   *
   * @param object aData
   *        A meta object that holds information about the object you want to
   *        display in the property panel. Object properties:
   *        - object:
   *        This is the raw object you want to display. You can only provide
   *        this object if you want the property panel to work in sync mode.
   *        - objectProperties:
   *        An array that holds information on the remote object being
   *        inspected. Each element in this array describes each property in the
   *        remote object. See WebConsoleUtils.inspectObject() for details.
   *        - objectPropertiesProvider:
   *        A function that is invoked when a new object is needed. This is
   *        called when the user tries to expand an inspectable property. The
   *        callback must take four arguments:
   *          - actorID:
   *          The object actor ID from which we request the properties.
   *          - callback:
   *          The callback function to be invoked when the remote object is
   *          received. This function takes one argument: the array of
   *          descriptors for each property in the object represented by the
   *          actor.
   *        - releaseObject:
   *        Function to invoke when an object actor should be released. The
   *        function must take one argument: the object actor ID.
   */
Use this setter to update the content of the tree.
@param object aData
A meta object that holds information about the object you want to
display in the property panel. Object properties:
- object:
This is the raw object you want to display. You can only provide
this object if you want the property panel to work in sync mode.
- objectProperties:
An array that holds information on the remote object being
inspected. Each element in this array describes each property in the
remote object.
Use this setter to update the content of the tree . @param object aData A meta object that holds information about the object you want to display in the property panel . Object properties : - object : This is the raw object you want to display . You can only provide this object if you want the property panel to work in sync mode . - objectProperties : An array that holds information on the remote object being inspected . Each element in this array describes each property in the remote object .
set data(aData) {
    let oldLen = this._rows.length;
    this.cleanup();
    if (!aData) {
      return;
    }
    if (aData.objectPropertiesProvider) {
      this._objectPropertiesProvider = aData.objectPropertiesProvider;
      this._releaseObject = aData.releaseObject;
      this._propertiesToRows(aData.objectProperties, 0);
      this._rows = aData.objectProperties;
    }
    else if (aData.object) {
      this._localObjectActors = Object.create(null);
      this._rows = this._inspectObject(aData.object);
    }
    else {
      throw new Error("First argument must have an objectActor or an " +
                      "object property!");
    }
    if (this._treeBox) {
      this._treeBox.beginUpdateBatch();
      if (oldLen) {
        this._treeBox.rowCountChanged(0, -oldLen);
      }
      this._treeBox.rowCountChanged(0, this._rows.length);
      this._treeBox.endUpdateBatch();
    }
  }
set data ( aData ) { let oldLen = this . _rows . length ; this . cleanup ( ) ; if ( ! aData ) { return ; } if ( aData . objectPropertiesProvider ) { this . _objectPropertiesProvider = aData . objectPropertiesProvider ; this . _releaseObject = aData . releaseObject ; this . _propertiesToRows ( aData . objectProperties , 0 ) ; this . _rows = aData . objectProperties ; } else if ( aData . object ) { this . _localObjectActors = Object . create ( null ) ; this . _rows = this . _inspectObject ( aData . object ) ; } else { throw new Error ( "First argument must have an objectActor or an " + "object property!" ) ; } if ( this . _treeBox ) { this . _treeBox . beginUpdateBatch ( ) ; if ( oldLen ) { this . _treeBox . rowCountChanged ( 0 , - oldLen ) ; } this . _treeBox . rowCountChanged ( 0 , this . _rows . length ) ; this . _treeBox . endUpdateBatch ( ) ; } }
Use this setter to update the content of the tree.
Use this setter to update the content of the tree .