Re: [XULRunner] Browser with "_blank" Links

Neil <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xpfe
Message-ID <[email protected]>
[email protected] 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.