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.getTabForBrowser()
retrieves a tab, given the XUL browser
object hosted by that tab.
Syntax
var tab = window.getTabForBrowser(browser);
browser
- The
browser
object hosted by this tab, which can be found as thebrowser
property of theTab
object.
Returns
tab
: the Tab
corresponding to this browser.
Example
This function returns the ID of a tab, given the tab's browser:
function tabID(browser) { let tab = window.BrowserApp.getTabForBrowser(browser); return tab.id; }