[Project_owners] Detecting if an extension is loaded intab/window/sidebar?

Jed jedbro at gmx.net
Thu Jan 22 16:09:54 EST 2004


HJ wrote:

>I hope this helps:
>
>var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(Components.interfaces.nsIWindowMediator);
>var myWindow = windowManager.getMostRecentWindow("quicknotes:somewindow");
>
>if (myWindow)
>  myWindow.focus();
>else 
>  open.dialog(../..);
>
><dialog id="some_id"
>        windowtype="quicknotes:somewindow"
>        ../..
>/HJ
>
Much appreciated, I'm not sure if that will work, but I'll give it a try.
Looks like I can use it temporarily, but this only will check to see if 
an actual "window" is open am I correct? If QN's open in a tab, I still 
won't know.

Any ideas?
Thanks again, I really appreciate the feedback.
--Jed



More information about the Project_owners mailing list