I know how to use background scripts with ES6 modules (basically, just use an HTML background file) and there is an open bug for native support for loading content scripts from WebExtensions:
That all said, what is the current best practise for loading content scripts as ES6 modules?
One idea I had was this:
- just load a minimal “usual” script that injects an HTML
script
tag into the current site that can then load the ES6 module from the add-on.
However, AFAIK, this breaks all security guarantees of extensions, because you’d need to add the ES6 module to web-accessible resources and the JavaScript would run at the same way/place/permissions as website-JS, loosing x-ray vision, would not it?
So what is the best way to do this, currently? (in a secure way)