Reputation: 7302
This answer is outdated:
let { Cc, Ci, Cu, CC } = require('chrome');
const {Blob, File} = Cu.import("resource://gre/modules/Services.jsm", {});
console.log(typeof Blob);//undefined
How do I import a blob?
Upvotes: 1
Views: 189
Reputation: 1455
Cu.importGlobalProperties(["Blob"]);
This works from FF35 onwards. The older approach should work on FF34 and lower.
Related reading at: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.importGlobalProperties
Upvotes: 1