MDN self-hosted library · e01.org

Firefox 126 release notes for developers

This article provides information about the changes in Firefox 126 that affect developers. Firefox 126 was released on May 14, 2024.

no runnable cells firefox-release-notes upstream source

This article provides information about the changes in Firefox 126 that affect developers. Firefox 126 was released on May 14, 2024.

Changes for web developers

Developer Tools

HTML

No notable changes.

MathML

Removals

  • The automatic adjustment for vertically centered operators (+, =, <, etc.) has been disabled by default. This behavior is not defined in MathML Core and was only necessary as a workaround for non-math fonts. It can still be enabled by setting the mathml.centered_operators.disabled config to false. (Firefox bug 1890531).

CSS

  • The zoom property is now supported. It can be used to increase or decrease the size of an element and its contents (Firefox bug 390936).

JavaScript

No notable changes.

HTTP

  • The zstd directive of the Content-Encoding HTTP header is now supported, allowing decoding of server-sent content encoded with the Zstandard compression algorithm (Firefox bug 1871963).

APIs

(Firefox bug 1322186).

  • The Element.currentCSSZoom read-only property is now supported for getting the effective CSS zoom of an element (Firefox bug 1880189).

DOM

  • The ability to define states for custom elements and match them using CSS selectors is now available by default. The custom states are represented as custom identifiers that can be added to or removed from the element's ElementInternals.states property (a CustomStateSet). The CSS :state() pseudo-class takes a custom identifier as an argument and matches custom elements if the identifier is present in their set of states (Firefox bug 1887543).
  • The Selection.direction property is now supported for indicating the direction of a range (Firefox bug 1867058).

Media, WebRTC, and Web Audio

Removals

WebDriver conformance (WebDriver BiDi, Marionette)

WebDriver BiDi

  • Added the contexts argument to the network.addIntercept command to limit the interception of network requests to particular top-level browsing contexts (Firefox bug 1882260).
  • Both the commands session.subscribe and session.unsubscribe now raise an invalid argument error when the value of the arguments events or contexts are empty arrays (Firefox bug 1887871).
  • Updated the implementation of the storage.getCookies command to align with the Gecko default cookie behavior. This allows the removal of the user value for the preference network.cookie.cookieBehavior, which was only expected to be set for our CDP implementation (Firefox bug 1879503).
  • Removed the ownership and sandbox arguments for the browsingContext.locateNodes command because they are no longer necessary (Firefox bug 1884935).
  • Improved error message for the session.new command when no capabilities are specified (Firefox bug 1838152).

Changes for add-on developers

  • The commands.onCommand event now passes the tab argument to the event listener. This enables extensions to apply a triggered shortcut to the page in which it was issued, without the need to call the tabs.query() method (Firefox bug 1843866).
  • The runtime.MessageSender type now includes the origin property. This enables message or connection requests to see the page or frame that opened the connection. This is useful for identifying if the origin can be trusted if it isn't apparent from the URL (Firefox bug 1787379).
  • The "webRequestAuthProvider" permission is now supported. This provides compatibility with Chrome for requesting permission for webRequest.onAuthRequired in Manifest V3 (Firefox bug 1820569).
  • The options_page manifest key is provided as an alias of the options_ui key. This has been provided to offer extensions better compatibility with Chrome (Firefox bug 1816960).
  • The tabs.captureVisibleTab method is now also enabled by the activeTab permission, providing compatibility with Chrome and Safari (Firefox bug 1784920).

Experimental web features

These features are newly shipped in Firefox 126 but are disabled by default. To experiment with them, search for the appropriate preference on the about:config page and set it to true. You can find more such features on the Experimental features page.

  • Selections crossing shadow DOM boundary: dom.shadowdom.selection_across_boundary.enabled.

The Selection.getComposedRanges() method can be used to get selection ranges that have anchor or focus nodes inside a shadow DOM — provided it is passed the ShadowRoot objects that contain those nodes. Selection methods setBaseAndExtent(), collapse(), and extend() have also been modified to accept nodes inside a shadow root (Firefox bug 1867058).

  • CSS shape() function: layout.css.basic-shape-shape.enabled.

You can use the shape() function to define shapes in the clip-path and offset-path properties. This function gives you more fine-grained control over the shapes you can define and offers several advantages over the path() function (Firefox bug 1823463 for shape() function support in clip-path, Firefox bug 1884424 for shape() function support in offset-path, Firefox bug 1884425 for shape() interpolation support).