Firefox 101 for developers

This article provides information about the changes in Firefox 101 that will affect developers. Firefox 101 was released on May 31, 2022.

Changes for web developers

HTML

No notable changes.

CSS

  • The prefers-contrast media feature that is used to detect whether the user has specified a preference for higher (more) or lower (less) contrast in the presentation of web content is now available by default. This feature now also lets users specify a set of colors to use for the contrast through the new custom value (bug 1656363).
  • Three new viewport sizes have been introduced: small (s), large (l), and dynamic (d). These new sizes have added new viewport-percentage length units in addition to the existing ones - vh, vw, vmax, and vmin. The new viewport-percentage length units include svh, lvh, dvh, svw, lvw, dvw, svmax, lvmax, dvmax, svmin, lvmin, and dvmin (bug 1610815). Additionally, the units vb and vi are now supported by default (bug 1610815).

JavaScript

No notable changes.

APIs

DOM

Media, WebRTC, and Web Audio

WebDriver conformance (WebDriver BiDi, Marionette)

Starting with this release of Firefox the WebDriver BiDi protocol will be enabled by default. A WebDriver BiDi session can be requested by using WebDriver classic (geckodriver, Marionette) and setting the webSocketURL capability to true when creating a new WebDriver session. The same capability will then contain the WebSocket end-point for BiDi clients to connect to.

The following commands and events are available:

For more information, see the full bug list.

Changes for add-on developers

  • Addition of the scripting API, which provides features to execute a script, insert and remove CSS, and manage the registration of content scripts (bug 1687764). This API is available to Manifest V3 extensions and takes over the execute script and insert and remove CSS features from the tabs API.
  • Addition of the action API, which takes over the features of the browserAction API in Manifest V3 extensions. Corresponding addition of the "action" manifest key. Note that the browserAction API and "action" manifest key are only available in Manifest V2 extensions.
  • The "background" manifest key property "persistent" can be set to false under the control of preferences: for Manifest V2, the extensions.eventPages.enabled preference, and in Manifest V3, the extensions.manifestV3.enabled preference.
  • Addition of the "host_permissions" manifest key, which is available for Manifest V3 extensions.
  • The content script execution environment has changed for Manifest V3 extensions:
    • Content scripts can no longer rely on host permissions to perform cross-origin requests. Cross-origin requests from content scripts are possible with CORS.
    • The content object (that offered content.fetch, content.XMLHttpRequest, and content.WebSocket) is removed from the content script execution environment.
  • Addition of the storage.StorageArea.onChanged event that enables you to listen for changes in content in the local and sync storage areas (bug 1758475).

Removals

Other

Older versions