B2G/gecko/browser/components/downloads/content/downloads.js
/**
   * Called when a data item is removed.  Ensures that the widget associated
   * with the view item is removed from the user interface.
   *
   * @param aDataItem
   *        DownloadsDataItem object that is being removed.
   */
Called when a data item is removed.  Ensures that the widget associated
with the view item is removed from the user interface.

@param aDataItem
DownloadsDataItem object that is being removed.
Called when a data item is removed . Ensures that the widget associated with the view item is removed from the user interface . @param aDataItem DownloadsDataItem object that is being removed .
function DV_onDataItemRemoved(aDataItem)
  {
    let itemIndex = this._dataItems.indexOf(aDataItem);
    this._dataItems.splice(itemIndex, 1);
    if (itemIndex < this.kItemCountLimit) {
      this._removeViewItem(aDataItem);
      if (this._dataItems.length >= this.kItemCountLimit) {
        this._addViewItem(this._dataItems[this.kItemCountLimit - 1], false);
      }
    }
    this._itemCountChanged();
  }
function DV_onDataItemRemoved ( aDataItem ) { let itemIndex = this . _dataItems . indexOf ( aDataItem ) ; this . _dataItems . splice ( itemIndex , 1 ) ; if ( itemIndex < this . kItemCountLimit ) { this . _removeViewItem ( aDataItem ) ; if ( this . _dataItems . length >= this . kItemCountLimit ) { this . _addViewItem ( this . _dataItems [ this . kItemCountLimit - 1 ] , false ) ; } } this . _itemCountChanged ( ) ; }
Called when a data item is removed.
Called when a data item is removed .
// The item to remove is visible in the panel. // Reinsert the next item into the panel.