Mozilla's getting a new look. What do you think? https://mzl.la/brandsurvey

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,