On 16/08/2013 10.22, Neil wrote: > Paolo Amadini wrote: >> A new about:config preference named "browser.download.useJSTransfer" >> enables the browser and the Downloads Panel to use the Downloads.jsm >> module instead of nsIDownloadManager as the back-end. The browser must >> be restarted for the preference to take effect. >> > I notice that this preference exists entirely in browser front-end code. > So how are other Mozilla products expected to test Downloads.jsm?
The API itself can be used without changing the preference at all, if you add items to the DownloadList using its methods. To switch downloads started from content to use the new API, you should register its nsITransfer component during "profile-after-change": const cid = Components.ID("{1b4c85df-cbdd-4bb6-b04e-613caece083c}"); Components.manager.QueryInterface(Ci.nsIComponentRegistrar) .registerFactory(cid, "", "@mozilla.org/transfer;1", null); http://mxr.mozilla.org/mozilla-central/source/browser/components/downloads/src/DownloadsStartup.js#96 At some point, we'll add a build-time switch to enable this component. Cheers, Paolo _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform