I have a question regarding window id in xul. I have something like in my xul file and I want to access this window from javascript. Basically, I want a function to return me a reference to that window using the name of it. Is there any function to do that?
Share
If you have a top-level XUL window, you can get a reference to it using nsIWindowMediator, like this:
navigator:browseris the type of the browser window, you would have to use thewindowtypeattribute value of your window. Note that this isn’t using theidattribute – the ID is a different thing and mostly useful to apply overlays.To get more than one window of the same type you would write: