Created
May 5, 2010 21:52
-
-
Save philikon/391496 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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