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 thebrowser
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();