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

getBrowserForWindow

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.getBrowserForWindow() retrieves a browser, given the DOM content window hosted by that browser.

Syntax

var browser = window.BrowserApp.getBrowserForWindow(window);

window
The DOM content window object hosted by this browser, which can be found as the contentWindow property of the browser object.

Returns

browser: the browser which hosts the given DOM content window.

Example

This code retrieves the browser for window, and calls its goBack() method.

  let browser = window.BrowserApp.getBrowserForWindow(window);
  browser.goBack();

See Also

Document Tags and Contributors

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