Re: Firefox javascript API reference is available where? Function exists: BrowserCloseOtherTabs()
Mike <[email protected]> Mon, 25 Apr 2005 04:33:23 -0500
| Newsgroups | gmane.comp.mozilla.documentation |
|---|---|
| Message-ID | <[email protected]> |
Ah...
Well I still can't make sense of all that.
I was a C programer and found C++ formal/riged. I like function
overloading. I cant go strictly object though.
But with a little shooting in the dark (cut/paste code segments from
functions listed in lxr) I did get this to work.
Why BrowserOpenTab() exists globally but removeAllTabsBut() is a method
on some thing still escapes me. Objects in XUL in XML... I must be
getting old. Thanks for the url... xlr is cool.
BrowserOpenTab();
var browser = getBrowser();
browser.removeAllTabsBut(browser.mCurrentTab);
/* All these failed failed 4/25/05 FireFox 1.0.2
BrowserCloseOtherTabs();
removeAllTabsBut();
CloseAllOtherTabs();
closeOtherTabs();
*/
Steffen Wilberg wrote:
> Mike wrote:
>
>> But in Firefox BrowserCloseOtherTabs() does not exist.
>> Anybody know the function I'm looking for?
>
> tabbrowser.xml has the method "removeAllTabsBut", with the current tab
> as a parameter.
>
>> Or a reference where I could find it.
>> Or an example?
>> Or a search engine that could find it?
>> (yes, I'm a little frustrated)
>
> lxr is your friend:
> http://lxr.mozilla.org/seamonkey/
> http://lxr.mozilla.org/seamonkey/search?string=removeAllTabsBut
> http://lxr.mozilla.org/seamonkey/source/toolkit/content/widgets/tabbrowser.xml#1080
>
>
> Steffen