Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Noitidart/10138f77d5355c6dfc5feb8163ba8557 to your computer and use it in GitHub Desktop.
Save Noitidart/10138f77d5355c6dfc5feb8163ba8557 to your computer and use it in GitHub Desktop.
_ff-addon-snippet-AccessBootstrapScope - example of how to access addon module scope of bootstrapped addon
var getScope = function(aAddonId) { var XPIScope = Cu.import('resource://gre/modules/addons/XPIProvider.jsm'); return XPIScope.XPIProvider.activeAddons.get(aAddonId).bootstrapScope; }; a = getScope('MouseControl@jetpack');
@Noitidart
Copy link
Author

README

Rev3

  • Updated for Firefox 47+

@Noitidart
Copy link
Author

var getScope = function(aAddonId) { var XPIScope = Cu.import('resource://gre/modules/addons/XPIProvider.jsm'); return XPIScope.XPIProvider.activeAddons.get(aAddonId).bootstrapScope; }; a = getScope('NativeShot@jetpack');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment