[Project_owners] obtaining reference to new tab

Adam Judson adamsplugins at gmail.com
Tue Dec 6 13:54:57 EST 2005


On 06/12/05, Eric H. Jung <grimholtz at yahoo.com> wrote:
> Thanks, Adam. Any idea if gBrowser.selectedTab works in Firefox *and*
> Mozilla?

No idea.

>
> BTW, I really enjoy TamperData!
>
Glad to hear it.

A


> --- Adam Judson <adamsplugins at gmail.com> wrote:
>
> > I'm using this:
> >
> >             var wm =
> > Components.classes["@mozilla.org/appshell/window-mediator;1"].
> > getService(Components.interfaces.nsIWindowMediator);
> >             var win = wm.getMostRecentWindow("navigator:browser");
> >             win.gBrowser.selectedTab = win.gBrowser.addTab(item.uri);
> >
> >
> > A
> >
> >
> > On 06/12/05, Eric H. Jung <grimholtz at yahoo.com> wrote:
> > > 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
> > >
> > > _______________________________________________
> > > Project_owners mailing list
> > > Project_owners at mozdev.org
> > > http://mozdev.org/mailman/listinfo/project_owners
> > >
> > > _______________________________________________
> > Project_owners mailing list
> > Project_owners at mozdev.org
> > http://mozdev.org/mailman/listinfo/project_owners
> >
>
>
>
>
> __________________________________________
> Yahoo! DSL – Something to write home about.
> Just $16.99/mo. or less.
> dsl.yahoo.com
>
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>


More information about the Project_owners mailing list