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 newcustom
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
, andvmin
. The new viewport-percentage length units includesvh
,lvh
,dvh
,svw
,lvw
,dvw
,svmax
,lvmax
,dvmax
,svmin
,lvmin
, anddvmin
(Firefox bug 1610815). Additionally, the unitsvb
andvi
are now supported by default (Firefox bug 1610815). - Support for the
inline-size
value for thecontain
property has been added. For more information, see (Firefox bug 1755565).
JavaScript
No notable changes.
APIs
DOM
-
HTMLMediaElement.preservesPitch
is now supported without themoz
prefix.mozPreservesPitch
is now an alias ofpreservesPitch
, but is deprecated, and may be removed in future releases (Firefox bug 1652950). HTMLInputElement.showPicker()
is now supported, allowing the picker for an input element to be displayed when a user interacts with some other element, such as a button (Firefox bug 1745005).DOMException
is now a serializable object, so it can be cloned withstructuredClone()
or copied between workers usingpostMessage()
(Firefox bug 1561357).-
Constructable stylesheets are now supported, making it much easier to create reusable stylesheets for use with Shadow DOM.
The update includes the addition of a
CSSStyleSheet()
constructor for creating new stylesheets, theCSSStyleSheet.replace()
andCSSStyleSheet.replaceSync()
methods that can be used to add/replace CSS rules in the sheet, and theDocument.adoptedStyleSheets
andShadowRoot.adoptedStyleSheets
properties that are used to share sheets to a document and its shadow DOM subtrees. See Firefox bug 1520690 for more information.
Media, WebRTC, and Web Audio
-
AV1 codec parameters are now properly parsed in media support queries.
This means that
MediaCapabilities.decodingInfo()
,HTMLMediaElement.canPlayType()
, andMediaSource.isTypeSupported()
will now accurately report support for playback for AV1 sources based on the provided codec parameters.MediaCapabilities.decodingInfo()
will also use the information to accurately report on "efficient decoding" of AV1 videos. For more information, see Firefox bug 1757861. -
maxFramerate
is now supported for setting the maximum framerate that can be used to send an encoding (inRTCPeerConnection.addTransceiver()
andRTCRtpSender.setParameters()
). Note that zero if a valid frame rate value, but is interpreted by Firefox as "no frame rate limit". For more information, see Firefox bug 1611957.
SVG
-
SVG images in the Firefox UI that are styled using
prefers-color-scheme
will respect thecolor-scheme
of the embedder (previouslyprefers-color-scheme
ignored thecolor-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:
- Adds the
session
module including a partial implementation for the commands to globally subscribe (session.subscribe
) to and unsubscribe (session.unsubscribe
) from events, and the ability to create a direct WebDriver BiDi session (session.new
) when not using WebDriver classic. - Adds the
browsingContext
module including the commands to open a new tab or window (browsingContext.create
) or close such one (browsingContext.close
), retrieve open browsing contexts (browsingContext.getTree
) and to navigate within a browsing context (browsingContext.navigate
). There is also support for the event when a browsing context got created (browsingContext.contextCreated
). - Adds the
log
module including support for log events (log.entryAdded
).
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 thelocal
andsync
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 thetabs
API. - Addition of the
action
API, which takes over the features of thebrowserAction
API in Manifest V3 extensions. Corresponding addition of the"action"
manifest key and_execute_action
special shortcut to the manifestcommands
key. Note that thebrowserAction
API and"browser_action"
manifest key are only available in Manifest V2 extensions. - The
"background"
manifest key property"persistent"
can be set tofalse
under the control of preferences: for Manifest V2, theextensions.eventPages.enabled
preference, and in Manifest V3, theextensions.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 offeredcontent.fetch
,content.XMLHttpRequest
, andcontent.WebSocket
) is removed from the content script execution environment.
- Addition of the
Older versions
- Firefox 100 for developers
- Firefox 99 for developers
- Firefox 98 for developers
- Firefox 97 for developers
- Firefox 96 for developers
- Firefox 95 for developers
- Firefox 94 for developers
- Firefox 93 for developers
- Firefox 92 for developers
- Firefox 91 for developers
- Firefox 90 for developers
- Firefox 89 for developers
- Firefox 88 for developers
- Firefox 87 for developers
- Firefox 86 for developers
- Firefox 85 for developers
- Firefox 84 for developers
- Firefox 83 for developers
- Firefox 82 for developers
- Firefox 81 for developers
- Firefox 80 for developers
- Firefox 79 for developers
- Firefox 78 for developers
- Firefox 77 for developers
- Firefox 76 for developers
- Firefox 75 for developers
- Firefox 74 for developers
- Firefox 73 for developers
- Firefox 72 for developers
- Firefox 71 for developers
- Firefox 70 for developers