Skip to content

Instantly share code, notes, and snippets.

@philikon
Created May 5, 2010 21:52
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 philikon/391496 to your computer and use it in GitHub Desktop.
Save philikon/391496 to your computer and use it in GitHub Desktop.
// Install jQuery in each XUL window namespace
var wu = require("window-utils");
var module = require("securable-module");
var windowtracker = new wu.WindowTracker({
onTrack: function (window) {
var namespace = {
window: window,
document: window.document,
location: window.location,
navigator: window.navigator
};
var loader = new module.Loader({rootPath: __url__,
globals: namespace,
defaultPrincipal: "system"});
loader.require("jquery");
},
onUntrack: function (window) {}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment