Hello,
I'm developing an application using xulrunner.
I've created a browser object, which should filter all links which
opens external windows. I override the onclick event for normal
links.
Now, I got a problem with javascript window.open links. I tried it in
the same way as firefox handles that, but the openURI method was never
called. I'm using XULRunner 1.9.0.4. Is there is anything which I have
to do additionally?
function nsBrowserAccess()
{
}
nsBrowserAccess.prototype =
{
QueryInterface : function(aIID)
{
if (aIID.equals(Ci.nsIBrowserDOMWindow) ||
aIID.equals(Ci.nsISupports))
return this;
throw Components.results.NS_NOINTERFACE;
},
openURI : function(aURI, aOpener, aWhere, aContext)
...
}
I've put this in the startup Method which is called from the
mainwindow.onload:
XULBrowserWindow = window.XULBrowserWindow;
window.QueryInterface(Ci.nsIDOMChromeWindow).browserDOMWindow =
new nsBrowserAccess();
If you needs more Information, please let me know.
Thank you in advance
Marc
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding