closeTab

The BrowserApp object is only available to privileged code running on Firefox for Android, and is intended for use by Firefox for Android add-ons.

Summary

BrowserApp.closeTab(tab) closes the supplied tab. If no other tabs are open, then the tab is not closed.

Syntax

window.BrowserApp.closeTab(tab);

tab
The tab to close, represented as a Tab object.

Example

This code closes the currently selected tab:

window.BrowserApp.closeTab(window.BrowserApp.selectedTab);

See Also

Document Tags and Contributors

Contributors to this page: wbamberg
Last updated by: wbamberg,