Firefox 125 release notes for developers
This article provides information about the changes in Firefox 125 that affect developers. Firefox 125 was released on April 16, 2024.
Changes for web developers
>HTML
No notable changes.
CSS
- The
align-contentproperty has been updated to work withdisplay: block;layouts. This brings all the layout positions fromflexandgridtoblock, enabling developers to align block-level elements without converting their container to aflexorgridcontainer. (Firefox bug 1882853). - The CSS property
transform-boxnow supports the valuescontent-boxandstroke-box. For the reference box, thecontent-boxvalue uses the content box and thestroke-boxvalue uses the stroke bounding box that contains an SVG's shape (Firefox bug 1868374). - The
content-visibilityCSS property valueautois now enabled by default. This allows content to skip rendering if it is not relevant to the user. (Firefox bug 1874874).
JavaScript
Intl.Segmenteris now supported, allowing developers to perform locale-sensitive text segmentation of a string. This enables, for example, splitting a string into words in languages that don't use spaces to separate them:Intl.Segmenter("ja-JP", { granularity: "word" }). You can also split strings into graphemes or sentences. (Firefox bug 1423593, Firefox bug 1883914.)
APIs
-
The Popover API is now fully supported, allowing the creation of top level "popover" UI elements that might be used for action menus, custom "toast" notifications, form element suggestions, content pickers, and so on. The popover and its triggering button/input can be created using either HTML attributes or JavaScript, and styled using CSS.
The following Web APIs are implemented:
HTMLButtonElementpropertiespopoverTargetElementandpopoverTargetAction.HTMLInputElementpropertiespopoverTargetElementandpopoverTargetAction.HTMLElementpropertypopover,hidePopover(),showPopover(), andtogglePopover()methods, andbeforetoggleandtoggle_eventevents (of typeToggleEvent).
The following CSS pseudo class and element are now supported for use with popovers:
:popover-open::backdrophas been extended to support popovers
The following HTML global attributes are supported:
-
The
RTCIceTransportpropertiesstateandgatheringState, and their associated eventsstatechangeandgatheringstatechange, are now supported, along with theRTCDtlsTransport.iceTransportproperty (which returns the underlyingRTCIceTransportfor aRTCDtlsTransport). These allow much finer-grained monitoring than provided by theRTCPeerConnectionpropertiesiceGatheringStateandconnectionState. (Firefox bug 1811912) -
Element.ariaBrailleLabelandElement.ariaBrailleRoleDescriptionare now supported, respectively reflecting the global ARIA HTML attributesaria-braillelabelandaria-brailleroledescription. (Firefox bug 1861201). -
Added support to allow web applications to gracefully recover if a canvas temporarily loses its 2D context, which might happen if the canvas is running hardware-accelerated on a GPU, and its driver crashes (Firefox bug 1887729). Here are some additional details on the events for lost and restored canvas contexts:
- Applications can monitor for
contextlostandcontextrestoredevents, which are fired on atHTMLCanvasElementwhen the context is lost and recovered, respectively, and can also check the context usingCanvasRenderingContext2D.isContextLost(). - After emitting
contextlost, a browser will try and restart the lost context, by default, but code can prevent this by cancelling the event. - Offscreen canvases can be monitored in the same way, but using
OffScreenCanvaseventscontextlostandcontextrestored, along withOffscreenCanvasRenderingContext2D.isContextLost().
- Applications can monitor for
-
Added support for the
shadowrootclonableattribute of the<template>element, and theshadowRootClonableproperty of theHTMLTemplateElementinterface that reflects it. These set theclonableproperty of aShadowRootthat has been created declaratively using the<template>element. (Firefox bug 1880188). -
The
readText()method of theClipboardinterface is now supported for asynchronously reading text from the system clipboard. When reading clipboard data that is not provided by the same-origin page, a paste context menu will appear for the user to confirm. (Firefox bug 1877400).
Media, WebRTC, and Web Audio
- The AV1 codec is now supported for Encrypted Media Extensions, enabling higher-quality playback from video streaming providers. (Firefox bug 1601817).
Removals
- The
SVGAElement.textproperty has been removed. ThetextContentproperty (inherited fromNode) is broadly supported and should be used instead. (Firefox bug 1880689).
WebAssembly
- Support has been added for Wasm modules to use multiple independent linear memories. Multiple memories enable more efficient interoperability between modules and better polyfills for upcoming Wasm standards. They can be used, for example, to create separate memory for internal and shared data, ephemeral and persisted data, or data that needs to be shared between threads. The memory can be created in JavaScript and imported into the Wasm module, or created in the Wasm module and exported. Each new linear memory in a Wasm instance is given a sequential index, starting from zero. WebAssembly memory instructions use the index to reference the memory on which they are operating, defaulting to the first memory defined if no index is specified. For more information, see WebAssembly Memory in Understanding WebAssembly text format. (Firefox bug 1860816).
WebDriver conformance (WebDriver BiDi, Marionette)
General
- Added support for the "userAgent" capability which identifies the default User-Agent value of the endpoint node (Firefox bug 1885495).
WebDriver BiDi
- Added support for the input.setFiles command which allows to set or update the files for
<input>elements withtype="file"(Firefox bug 1855040). - Added support for the storage.deleteCookies command to delete cookies (Firefox bug 1854581).
- Added support for "userContext" as a field of the "partition" argument for cookie commands (Firefox bug 1875255).
- Fixed an issue where storage.getCookies would not retrieve all expected cookies for a given "sourceOrigin" (Firefox bug 1884647).
- Fixed an issue where recommended preferences would not be applied if only WebDriver BiDi as remote protocol, which means CDP is disabled, was enabled (Firefox bug 1882748).
- Fixed an issue where creating and switching to a new tab would not wait for the
visibilityStateto be updated (Firefox bug 1877469).
Changes for add-on developers
- The content of the
proxy.ProxyInfopropertyproxyAuthorizationis now passed to theProxy-Authorizationrequest header sent to HTTP proxies (in addition to the existing support for HTTPS proxies) as part of a CONNECT request (Firefox bug 1794464).
Experimental web features
These features are shipping in Firefox 125 but only in developer releases or behind a preference. To try these out, you can search for the related preference on the about:config page to see if they're enabled or disabled. To learn more about these features, see the Experimental features page.
-
CSS
transition-behavior:layout.css.transition-behavior.enabled.The
transition-behaviorproperty is enabled by default in the Nightly release. Authors can use this property to control whether to apply CSS transitions to properties with a discrete animation type (Firefox bug 1882408, Firefox bug 1805727). -
UA styles for
<h1>nested into sectioning elements:layout.css.h1-in-section-ua-styles.enabled.The
<h1>heading doesn't decrease in font size now when nested within sectioning elements<article>,<aside>,<nav>, and<section>. The UA styles for<h1>nested within sectioning elements are no longer relevant since the outline algorithm has been removed from the HTML specification. (Firefox bug 1883896).Note: The preference for this feature works in reverse: it's set to
falsein the Nightly build, which removes the UA styling for headings nested in sectioning elements. It's set totruein all other channels, which retains the existing UA styling for the nested headings.