问题
In Firefox, is there an API equivalent to Google Chrome's chrome.downloads API?
I need to control downloads with functions such as pause, resume, and cancel. In addition, I want to be able to remove the downloaded file.
If there is no API in Firefox add-on SDK, is it possible to do the same things in another way?
回答1:
The API's are (links to documentation on MDN):
- Downloads.jsm
- Download
- DownloadTarget
- PlacesUtils.There is good info at paa's answer to the question: API to modify Firefox downloads list
来源:https://stackoverflow.com/questions/29003125/is-there-an-api-to-control-downloads-in-firefox-add-on-sdk