[XULRunner] Browser with "_blank" Links

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[XULRunner] Browser with "_blank" Links

therobkellett
Hi,

I'm developing a XULRunner app that uses a <browser>.  I've noticed that nothing occurs when a link with a target of "_blank" is clicked in the browser.  How would I go about capturing when a _blank link is clicked so I can open a new window?

Thanks,
-Rob
_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul
Reply | Threaded
Open this post in threaded view
|

Re: [XULRunner] Browser with "_blank" Links

Neil-4
[hidden email] wrote:

>I'm developing a XULRunner app that uses a <browser>.  I've noticed that nothing occurs when a link with a target of "_blank" is clicked in the browser.  How would I go about capturing when a _blank link is clicked so I can open a new window?
>  
>
You have two alternatives:

   1. Set the browser.chromeURL preference to the chrome: URL of your
      browser UI. Your UI must contain a <browser type=content-primary>.
      Gecko will then open another copy of your window when a _blank
      link is clicked. After your window has opened, it will start
      loading the link into the new window.
   2. Implement the nsIBrowserDOMWindow object. Gecko will ask your
      object for a window when a _blank link is clicked. You can open a
      window, tab, or simply return the existing content window, which
      disables the effect of _blank.

--
Warning: May contain traces of nuts.
_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul