It seems to me that if there's no navigator window, your extension
(whatever it is) is probably of no use either (or just let your
extension fail). Although it's just an educated guess, I think this is
what you want:
an overlay of browser.xul:
<overlay id="myOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript"
src="chrome://bookmarkshome/content/quickDialog.js"/>
and in quickDialog.js:
function myGetNavigatorWindow() {
return
Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService( Components.interfaces.nsIWindowMediator )
.getMostRecentWindow( "navigator:browser" );
}
var navigatorWindow = myGetNavigatorWindow();
navigatorWindow.functionName()
This won't work if there are no navigator windows working.
Correct, and that is why I check for chrome windows first (this will
open a new window when needed) but what I want is in function for all JS
functions that I need from that chrome window.
_______________________________________________
Project_owners mailing list
[email protected]
http://mozdev.org/mailman/listinfo/project_owners