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 (Firefox 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 (Firefox bug 1610815). Additionally, the units vb and vi are now supported by default (Firefox bug 1610815).
  • Support for the inline-size value for the contain property has been added. For more information, see (Firefox bug 1755565).

JavaScript

No notable changes.

APIs

DOM

Media, WebRTC, and Web Audio

SVG

  • SVG images in the Firefox UI that are styled using prefers-color-scheme will respect the color-scheme of the embedder (previously prefers-color-scheme ignored the color-scheme of the embedder and triggered off either the device or browser theme). This ensures that a favicon, for example, is always styled to match the theme of the elements that nest it, and not necessarily the (potentially different) theme of the device. (Firefox bug 1764354).

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 storage.StorageArea.onChanged event that enables you to listen for changes in content in the local and sync storage areas (Firefox bug 1758475).
  • Manifest V3 preview features:
    • Addition of the scripting API, which provides features to execute a script, insert and remove CSS, and manage the registration of content scripts (Firefox 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 and _execute_action special shortcut to the manifest commands key. Note that the browserAction API and "browser_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.

Older versions