[Project_owners] link opens in new tab

jeroen groenenboom jagrboom at zonnet.nl
Wed Sep 22 21:32:37 EDT 2004


Great!!!!!! Thanks a lot Neil!
Jeroen

On Wed, Sep 22, 2004 at 06:00:49PM +0100, Neil wrote:
> jeroen groenenboom wrote:
> 
> >I'd like to create a (text/javascript) link in a html document that opens 
> >a url in a new tab. The document has a chrome url, so all interfaces can 
> >be used.
> >
> So this document has been loaded into the content area like, say, 
> about:plugins might be? Try
> 
> window
> .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
> .getInterface(Components.interfaces.nsIWebNavigation)
> .QueryInterface(Components.interfaces.nsIDocShellTreeItem)
> .rootTreeItem
> .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
> .getInterface(Components.interfaces.nsIDOMWindow)
> .getBrowser()
> .addTab(url);
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners


More information about the Project_owners mailing list