I’m trying to make a little extension for Firefox Android, and I need a BrowserApp
object (ideally I’d also like a NativeWindow
object, but they usually come from the same source). MDN has a way to do this, but there are a few issues:
First: The ‘Chrome Authority’ is deprecated, and only supposed to be used by ‘old-style’ extensions, not the ‘new-style’ WebExtensions that I am using.
Second: If I actually use their method, I get some issues, requirejs says that ‘“chrome” has not been loaded yet’, and if I use the require([...])
method, I get a ‘script error in “chrome”’. I do not own the “chrome” file, so I can’t fix these issues.
I’m trying to do this from a ‘background’ script, because I also need access to the browser.download
api, which I can’t access from a ‘bootstrap’ script.