Skip to content

Instantly share code, notes, and snippets.

@yajd
Created April 30, 2014 01:48
Show Gist options
  • Save yajd/17ee5b1b98cb717c8429 to your computer and use it in GitHub Desktop.
Save yajd/17ee5b1b98cb717c8429 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 XPIScope = Cu.import('resource://gre/modules/XPIProvider.jsm');
alert(XPIScope.XPIProvider)
var scope = XPIScope.XPIProvider.bootstrapScopes['ghForkable@jetpack'];
alert(scope)
@Noitidart
Copy link

var getScope = function() { var XPIScope = Cu.import('resource://gre/modules/addons/XPIProvider.jsm'); return XPIScope.XPIProvider.bootstrapScopes['MouseControl@jetpack']; }; a = getScope();

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