[Project_owners] obtaining reference to new tab

Eric H. Jung grimholtz at yahoo.com
Tue Dec 6 05:32:16 EST 2005


Hi,

I'm using this code to open a new, empty tab. How can I get a reference
to the new tab so I can insert content? window.open() returns a
reference to the new window, but I don't know how to get a similar
reference for a new tab. Any ideas?

var wm = Components
  .classes["@mozilla.org/appshell/window-mediator;1"]
  .getService(Components.interfaces.nsIWindowMediator);
var recentWindow = wm.getMostRecentWindow("navigator:browser");
if (recentWindow)
  recentWindow.delayedOpenTab("about:blank");

Thank you,
Eric Jung



		
__________________________________________ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 



More information about the Project_owners mailing list