DocShell/Window targeting: Difference between revisions

No edit summary
Line 17: Line 17:


We need to do something to fix steps 5 and 7.
We need to do something to fix steps 5 and 7.
== Comments ==


The use-case I'm running up against is a xulrunner-based "webrunner" (imagine gmail in a separate process). It will call window.open(url, "_blank") and I need to redirect this load into the externalprotocolhandler. I think I can hack this on the 1.8 branch by implementing nsIBrowserDOMWindow and setting "openinnewtab" to true, and then forcing nsIBrowserDOMWindow.openURI into the external protocol handler. The problem is that this catches all popup windows, whether they are meant to be "application popups" or "browser loads. I could imagine window.open("appwindow=true") to be overloaded so that webrunner apps could open app popup windows, or "external=true" to force open-in-default-browser. But both of those require coordinating windowwatcher with docshell.
The use-case I'm running up against is a xulrunner-based "webrunner" (imagine gmail in a separate process). It will call window.open(url, "_blank") and I need to redirect this load into the externalprotocolhandler. I think I can hack this on the 1.8 branch by implementing nsIBrowserDOMWindow and setting "openinnewtab" to true, and then forcing nsIBrowserDOMWindow.openURI into the external protocol handler. The problem is that this catches all popup windows, whether they are meant to be "application popups" or "browser loads. I could imagine window.open("appwindow=true") to be overloaded so that webrunner apps could open app popup windows, or "external=true" to force open-in-default-browser. But both of those require coordinating windowwatcher with docshell.


--[[User:Benjamin Smedberg|bsmedberg]] 09:06, 28 Oct 2005 (PDT)
--[[User:Benjamin Smedberg|bsmedberg]] 09:06, 28 Oct 2005 (PDT)
Confirmed users, Bureaucrats and Sysops emeriti
1,217

edits