Enables extensions to interact with the browser's download manager. You can use this API module to download files, cancel, pause, resume downloads, and show downloaded files in the file manager.
- Defines options for what to do if the name of a downloaded file conflicts with an existing file.
- Defines a set of possible reasons why a download was interrupted.
- Defines a set of common warnings of possible dangers associated with downloadable files.
- Defines different states that a current download can be in.
- Represents a downloaded file.
- Represents the difference between two strings.
- Represents the difference between two doubles.
- Represents the difference between two booleans.
- Represents the time a download took to complete.
- Defines a set of parameters that can be used to search the downloads manager for a specific set of downloads.
- Downloads a file, given its URL and other optional preferences.
- Queries the
DownloadItemsavailable in the browser's downloads manager, and returns those that match the specified search criteria.
- Pauses a download.
- Resumes a paused download.
- Cancels a download.
- Retrieves an icon for the specified download.
- Opens the downloaded file with its associated application.
- Opens the platform's file manager application to show the downloaded file in its containing folder.
- Opens the platform's file manager application to show the default downloads folder.
- Erases matching
DownloadItemsfrom the browser's download history, without deleting the downloaded files from disk.
- Removes a downloaded file from disk, but not from the browser's download history.
- Prompts the user to accept or cancel a dangerous download.
- Initiates dragging the downloaded file to another application.
- Enables or disables the gray shelf at the bottom of every window associated with the current browser profile. The shelf will be disabled as long as at least one extension has disabled it.
- Fires with the
DownloadItemobject when a download begins.
- Fires with the
downloadIdwhen a download is erased from history.
- When any of a
DownloadItem's properties except
bytesReceivedchanges, this event fires with the
downloadIdand an object containing the properties that changed.
|Chrome||Edge||Firefox||Firefox for Android||Opera|
|Yes||No||47 *||48 *||Yes|
|Yes||No||47 *||48 *||Yes|
The "Chrome incompatibilities" section is included from https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Chrome_incompatibilities using the WebExtChromeCompat macro.
If you need to update this content, edit https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Chrome_incompatibilities, then shift-refresh this page to see your changes.
This API is based on Chromium's
Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.
// Copyright 2015 The Chromium Authors. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.