[Project_owners] Opening links in tabs
wrobel at blues.ath.cx
Wed Feb 14 02:47:39 PST 2007
On Tue, 13 Feb 2007, Didier Ernotte wrote:
> When you say "my extension window" and firefox window do you mean the
> new tab and the current tab ? is it a problem of selected tab ?
No, I mean separate window (window in which user can set some
preferences for my extension and also click for example [help] to open
web page with help in new Firefox tab - this doesn't work well for me)
> --- Jan Wrobel <wrobel at blues.ath.cx> wrote:
> > Hi,
> > I have some links in my extension window that I want to be opened in
> > new Firefox tabs when user clicks on them. I use following code:
> > 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(url);
> > It works fine except that my extension window hides under Firefox
> > window when link is clicked and I want it to stay on top. I've
> > found few extensions that open links exactly in a way I want, but I
> > responsible for this behaviour.
> > Do you know how to solve this problem?
> > Cheers,
> > Jan
> > _______________________________________________
> > 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
More information about the Project_owners