Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

getTabForBrowser

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 the browser property of the Tab 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;
}

See Also

Document Tags and Contributors

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