Reputation: 157
How to access navigator.plugins object in main.js file? I use a Firefox Add-on SDK.
Upvotes: 3
Views: 391
Reputation: 25332
Every add-on comes with it's own "hidden" window, that could be used for some stuff. It's not well documented, but you should be able to do something like:
let { window: {navigator} } = require('sdk/addon/window');
console.log(navigator.plugins);
Upvotes: 3
Reputation: 157
var windows = require("sdk/window/utils");
var window = windows.getMostRecentBrowserWindow();
console.log(window.navigator.plugins);
Upvotes: 3