Firefox gets a User Scripts API

silversurfer

Level 85
Thread author
Verified
Honorary Member
Top Poster
Content Creator
Malware Hunter
Well-known
Aug 17, 2014
10,055
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:
  • 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.
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.

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.
 

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top