Search code examples
javascriptxpcom

Getting access to window object in JSM


I am creating a firefox extension. I want to get a reference to the window object in a JSM file.
The file is then imported using

Components.utils.import("resource://js/my_module.jsm");

In my_module.jsm there is this line:

var jQenv = window.content.document;

which throws the error, "window is not defined"

How can I get access to the window object in the JSM file?


Solution

  • To get access to the window object that you want, see this documentation.