I'm trying to use the Downloads.jsm lib of Firefox (it's new in Firefox 23) in a jetpack addin.
var {Cu} = require("chrome"); //works fine
const {Downloads} = Cu.import("resource://gre/modules/Downloads.jsm"); //works fine
But executing either of these functions has no effect:
download = Downloads.createDownload({source: "http://cdn.sstatic.net", target: "/tmp/kaki.html"}); //download is an object but has no function "start"
Downloads.simpleDownload("http://cdn.sstatic.net","/tmp/kaki.html");
Documentation: https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Downloads.jsm https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Downloads.jsm/Download
Do you have any idea, how to use these functions? I haven't found any examples on the web