I would like to include jQuery in a Firefox extension.
I add the following line of code to import the jQuery file:
Components.utils.import("resource://js/jquery.js", window.content.document);
Firefox runs the file immediately after importing. The jQuery file looks like this with an anonymous closures:
(function( window, undefined ) {
...bunch of code....
_jQuery = window.jQuery,
})(window);
When the extension runs there is an error "window is not defined". What is a way to give jQuery access to the window?