[Project_owners] link opens in new tab

Neil neil at parkwaycc.co.uk
Wed Sep 22 19:00:49 EDT 2004


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);


More information about the Project_owners mailing list