I\'d like to call window.crypto.subtle.generateKey in my Firefox AddOn. Since I can not access window in main.js I create a page-worker with a
window.crypto.subtle.generateKey
window
in main.js you can ...
const { Cu } = require("chrome"); Cu.importGlobalProperties(["crypto"]);
then you'll have access to crypto.subtle.generateKey as well as all the other crypto goodness ... note no window
crypto.subtle.generateKey
crypto