Mozilla is working on implementing a UserScripts WebExtensions API in the organization's Firefox web browser.
Firefox, just like Google Chrome and many other web browsers, supports so-called user scripts. These scripts are executed on page load to add, remove, or change functionality on the page that gets loaded.
User scripts exist for numerous purposes: from adding download options on video sites to changing how web page looks.
Mozilla addresses several issues related to user scripts with the upcoming User Scripts API:
The new API runs each user script in its own sandbox to isolate them from one another; this is a different approach to how content scripts are handled from extensions like Greasemonkey or Tampermonkey, as they are executed in the same process.
- Performance issues -- better isolation of scripts thanks to efficient methods.
- Reliability issues -- issues during page load and race conditions between the page loading and script injection.
- Security issues -- the use of sandboxes for individual user scripts reduces the impact that scripts have may have on each other.
Support for providing user scripts with a set of functions, e.g. Greasemonkey GM_ functions, is supported as well.
Mozilla's initial plan was to introduce support in Firefox 63 but the introduction has been postponed. The new target is Firefox 68 Stable.