Provides an aggregated view on the contents of a DownloadList.
A reference to a DownloadSummary object can be obtained using the Downloads.getSummary() function.
Promise bindToList(DownloadList aList); |
Promise addView(Object aView); |
Promise removeView(Object aView); |
| Attribute | Type | Description |
allHaveStopped Read only |
boolean |
Indicates whether all the downloads are currently stopped. |
progressTotalBytes Read only |
number |
Indicates the total number of bytes to be transferred before completing all the downloads that are currently in progress. For downloads that do not have a known final size, the number of bytes currently transferred is reported as part of this property. This is zero if no downloads are currently in progress. |
progressCurrentBytes Read only |
number |
Number of bytes currently transferred as part of all the downloads that are currently in progress. This is zero if no downloads are currently in progress. |
This method may be called once to bind this object to a DownloadList.
Views on the summarized data can be registered before this object is bound to an actual list. This allows the summary to be used without requiring the initialization of the DownloadList first.
Downloads.getSummary() function.Promise bindToList( DownloadList aList );
aListDownloadList whose contents should be summarized.undefined when the view on the underlying list has been registered.
Adds a view that will be notified of changes to the summary. The newly added view will receive an initial onSummaryChanged notification.
Promise addView( Object aView );
aViewonSummaryChanged: Optional Called after any property of the summary has changed.undefined when the view has been registered and the onSummaryChanged notification has been sent.
Removes a view that was previously added using addView().
Promise removeView( Object aView );
aViewundefined when the view has been removed. At this point, the removed view will not receive any more notifications.