I am porting an extension from Google Chrome into Firefox's Addon SDK (v1.9). Since it uses jQuery on the background page (main.js on Firefox), I would like to use that library as well on the Firefox version. However, since the window object is not accessible from the addon code itself (and jQuery is widely based on that), I was wondering if there was a better way of implementing the jQuery library from the addon code. Maybe there is a way to import jQuery as a module using "require('jquery')".
Just to clarify, I am aware of how to implement jQuery on content scripts. What I am trying to do is use jQuery on the addon code itself, such as "main.js" (or whatever name you give the background "main" module).
pageModwithcontentScriptFile? That will let you inject jquery into the addon's content script code which has access to the page content. Then you can useportmessaging to communicate between the addon and the contents script.