B2G/gecko/browser/devtools/webconsole/AutocompletePopup.jsm
/**
   * Set the autocomplete items list, in one go.
   *
   * @param array aItems
   *        The list of items you want displayed in the popup list.
   */
Set the autocomplete items list, in one go.
@param array aItems
The list of items you want displayed in the popup list.
Set the autocomplete items list in one go . @param array aItems The list of items you want displayed in the popup list .
function AP_setItems(aItems)
  {
    this.clearItems();
    aItems.forEach(this.appendItem, this);
    if (this.isOpen) {
      this._document.defaultView.setTimeout(this._updateSize.bind(this), 1);
    }
  }
function AP_setItems ( aItems ) { this . clearItems ( ) ; aItems . forEach ( this . appendItem , this ) ; if ( this . isOpen ) { this . _document . defaultView . setTimeout ( this . _updateSize . bind ( this ) , 1 ) ; } }
Set the autocomplete items list, in one go.
Set the autocomplete items list in one go .
// Make sure that the new content is properly fitted by the XUL richlistbox. // We need the timeout to allow the content to reflow. Attempting to // update the richlistbox size too early does not work.