Developers from Mozilla updated information about plans related to supporting the second and third versions of the Chrome manifest in Firefox. Google in June of this year intends Stop supporting add-ons using manifest version 2 in Chrome 127 testing releases (Dev, Canary, and Beta). In the stable branch, support for the second version of the manifest will be stopped no earlier than July.
In turn, Mozilla will not stop supporting the second version of the manifesto in the foreseeable future, and will retain the ability to launch add-ons that use features not available in the third version of the manifesto. The decision to not make Firefox fully compatible with version 3 of the Chrome manifest remains in effect. Firefox will retain the full-fledged webRequest API, which will be switched to read-only mode in Chrome.
In Firefox also using the mechanism Event Pages support for executing background scripts based on the DOM will be retained, instead of which the third version of the manifest requires the use of Service Workers. Background scripts based on Service Workers are not yet supported in Firefox, but developers will be given the opportunity to define both an Event Pages-based handler and scripts based on Service Workers in the add-on, which will allow them to create add-ons that comply with the third version of the manifest and work in Chrome and Firefox .
The Chrome manifest defines the capabilities and resources available to extensions written using the WebExtensions API. Starting with version 57, Firefox completely switched to using the WebExtensions API for developing add-ons and stopped supporting XUL technology. The transition to WebExtensions made it possible to unify the development of add-ons with the Chrome, Opera, Safari and Edge platforms, simplified the porting of add-ons between different web browsers and made it possible to fully use the multi-process mode of operation (WebExtensions add-ons can be executed in separate processes, isolated from the rest of the browser). To unify the development of add-ons with other browsers, Firefox provides almost full compatibility with the second version of the Chrome manifest.
As part of an initiative to make it easier to create secure, high-performing add-ons, and make it harder to create insecure and slow add-ons, Google has developed version three of the manifest. The main dissatisfaction with the third version of the manifest is caused by the translation into read-only mode of the API webRequest, which allowed you to connect your own handlers that have full access to network requests and can modify traffic on the fly. Instead of the webRequest API, the third version of the manifest added an API limited in its capabilities declarativeNetRequestwhich provides access to a built-in filtering engine that independently processes blocking rules and does not allow the use of its own filtering algorithms.
Among the features of implementing the third version of the manifest in Firefox:
- A new declarative content filtering API has been added, but unlike Chrome, support for the old blocking mode of the webRequest API has not been discontinued.
- Mechanism implemented Event Pages, which is more familiar to web developers, does not require a complete reworking of add-ons and eliminates the limitations associated with the use of Service Workers. Event Pages will allow existing background page additions to conform to the requirements of the third version of the manifest, while maintaining access to all the capabilities needed to work with the DOM.
- The new granular permission request model – the add-on will not be able to be activated for all pages at once (the “all_urls” permission has been removed), but will only work in the context of the active tab, i.e. the user will need to confirm that the add-on works for each site. In Firefox, all requests to access site data will be considered optional, and the final decision on granting access will be made by the user, who will be able to selectively decide which add-on to grant access to their data on a particular site.
To manage permissions in the interface added “Unified Extensions” button to directly control which sites each add-on has access to – the user can grant and revoke add-on access to any site. Permission management applies only to add-ons based on the third version of the manifest; for add-ons based on the second version of the manifest, granular access control to sites is not performed.
- Change in processing of Cross-origin requests – in accordance with the new manifest, content processing scripts will be subject to the same permission restrictions as for the main page into which these scripts are embedded (for example, if the page does not have access to the location API, then the script add-ons will also not receive this access). This change is fully implemented in Firefox.
- Promise based API. Firefox supports this API for the third version of the manifest.
- Prohibiting the execution of code downloaded from external servers (we are talking about situations when the add-on loads and executes external code). Firefox uses external code blocking and Mozilla has added additional techniques to track code downloads. For content processing scripts, a separate policy for restricting access to content is provided (CSPContent Security Policy).
Thanks for reading: