third_party/js/mozmill/shared-modules/downloads.js
function downloadManager_cancelActiveDownloads() {
    // Get a list of all active downloads (nsISimpleEnumerator)
    var downloads = this._dms.activeDownloads;
    
    // Iterate through each active download and cancel it
    while (downloads.hasMoreElements()) {
      var download = downloads.getNext().QueryInterface(Ci.nsIDownload);
      this._dms.cancelDownload(download.id);
    }
  }
function downloadManager_cancelActiveDownloads() {
    // Get a list of all active downloads (nsISimpleEnumerator)
    var downloads = this._dms.activeDownloads;
    
    // Iterate through each active download and cancel it
    while (downloads.hasMoreElements()) {
      var download = downloads.getNext().QueryInterface(Ci.nsIDownload);
      this._dms.cancelDownload(download.id);
    }
  }
function downloadManager_cancelActiveDownloads ( ) { // Get a list of all active downloads (nsISimpleEnumerator) var downloads = this . _dms . activeDownloads ; // Iterate through each active download and cancel it while ( downloads . hasMoreElements ( ) ) { var download = downloads . getNext ( ) . QueryInterface ( Ci . nsIDownload ) ; this . _dms . cancelDownload ( download . id ) ; } }
Cancel all active downloads
Cancel all active downloads