Back to Content

Firefox 142 release notes for developers

files/en-us/mozilla/firefox/releases/142/index.md

latest11.2 KB
Original Source

This article provides information about the changes in Firefox 142 that affect developers. Firefox 142 was released on August 19, 2025.

Changes for web developers

HTML

Removals

  • The {{HTMLElement('object')}} element no longer supports the deprecated codebase attribute. Use the data attribute instead. (See Firefox bug 1973900 for more details.)

CSS

JavaScript

No notable changes.

APIs

DOM

  • The {{domxref("Selection.getComposedRanges()")}} method is now supported, allowing developers to accurately get selected text ranges across shadow DOM boundaries. In addition, the methods {{domxref("Selection.setBaseAndExtent()","setBaseAndExtent()")}}, {{domxref("Selection.collapse()","collapse()")}}, and {{domxref("Selection.extend()","extend()")}} of the {{domxref("Selection")}} interface have been modified to accept nodes inside a shadow root. (Firefox bug 1903870).
  • The {{domxref("Animation.overallProgress")}} property is now supported, allowing developers to track and display progress through an animation. (Firefox bug 1834878).
  • The {{domxref("Animation.commitStyles()")}} method no longer requires fill to be set on an animation to commit the computed styles after the animation has finished. Note that until more browsers support this change, you should continue to set fill. (Firefox bug 1973203).
  • The Prioritized Task Scheduling API is now supported, providing a standardized mechanism to assign and manage task priorities for an application. The supported interfaces include: {{domxref("Scheduler")}}, {{domxref("TaskController")}}, {{domxref("TaskSignal")}}, {{domxref("TaskPriorityChangeEvent")}} (and the {{domxref("TaskSignal/prioritychange_event","prioritychange")}} event), and the properties {{domxref("Window.scheduler")}} and {{domxref("WorkerGlobalScope.scheduler")}}. The {{domxref("Scheduling")}} interface and the {{domxref("Navigator.scheduling")}} property are not supported. (Firefox bug 1966997).

Media, WebRTC, and Web Audio

  • The {{domxref("RTCIceCandidatePairStats/currentRoundTripTime", "currentRoundTripTime")}}, {{domxref("RTCIceCandidatePairStats/totalRoundTripTime", "totalRoundTripTime")}}, and {{domxref("RTCIceCandidatePairStats/responsesReceived", "responsesReceived")}} properties of the {{domxref("RTCIceCandidatePairStats")}} dictionary are now supported. These return the current round trip time (RTT) and the information needed to calculate the average RTT for the connection. (Firefox bug 1371391).
  • The {{domxref("RTCRtpSender.setParameters()","setParameters()")}} and {{domxref("RTCRtpSender.getParameters()","getParameters()")}} methods of the {{domxref("RTCRtpSender")}} interface now support setting and getting the specific codec used for each encoding. You can also set a codec for each encoding in the init.sendEncodings array that's passed to the {{domxref("RTCPeerConnection/addTransceiver","addTransceiver()")}} method of the {{domxref("RTCPeerConnection")}} interface. (Firefox bug 1894137).
  • The {{domxref("RTCInboundRtpStreamStats.estimatedPlayoutTimestamp", "estimatedPlayoutTimestamp")}}, {{domxref("RTCInboundRtpStreamStats.framesAssembledFromMultiplePackets", "framesAssembledFromMultiplePackets")}}, {{domxref("RTCInboundRtpStreamStats.freezeCount", "freezeCount")}}, {{domxref("RTCInboundRtpStreamStats.jitterBufferMinimumDelay", "jitterBufferMinimumDelay")}}, {{domxref("RTCInboundRtpStreamStats.jitterBufferTargetDelay", "jitterBufferTargetDelay")}}, {{domxref("RTCInboundRtpStreamStats.keyFramesDecoded", "keyFramesDecoded")}}, {{domxref("RTCInboundRtpStreamStats.pauseCount", "pauseCount")}}, {{domxref("RTCInboundRtpStreamStats.totalAssemblyTime", "totalAssemblyTime")}}, {{domxref("RTCInboundRtpStreamStats.totalFreezesDuration", "totalFreezesDuration")}} and {{domxref("RTCInboundRtpStreamStats.totalPausesDuration", "totalPausesDuration")}} properties of the {{domxref("RTCInboundRtpStreamStats")}} interface are now supported. (Firefox bug 1926622).

WebDriver conformance (WebDriver BiDi, Marionette)

General

  • Removed FTP proxy support from WebDriver capabilities (Firefox bug 1972670).
  • Updated the expiry value of all the cookies set via WebDriver BiDi and WebDriver classic (Marionette) to be limited to 400 days (Firefox bug 1974394).

WebDriver BiDi

  • Implemented the new emulation.setLocaleOverride command which allows clients to override a locale in JavaScript APIs (Firefox bug 1968952).
  • Improved setting a proxy with browsingContext.createUserContext: added support for host patterns like .mozilla.org in noProxy property (Firefox bug 1977180) and fixed a bug when setting a HTTP proxy wouldn't allow to navigate to HTTPS URLs (Firefox bug 1977168).
  • Fixed a bug where browsingContext.create would fail after a browsingContext.print command was interrupted by closing a tab with the browsingContext.close command (Firefox bug 1841125).
  • Updated the session.end command to resume all requests which were blocked by network interceptions (Firefox bug 1974426).

Marionette

  • Updated the WebDriver:AddCookie command to throw an error when a target cookie has sameSite=none and secure=false attributes (Firefox bug 1977205).
  • Removed the dialog text value from the unexpected alert open error message, since the dialog text is available now via the data field (Firefox bug 1948236).

Changes for add-on developers

  • Cookies created with {{WebExtAPIRef("cookies.set()")}} in Nightly are now validated, and invalid cookies are rejected. The implementation in Nightly is to enable monitoring for any issues. The intention is to enforce validation in all channels in a future release. (Firefox bug 1976197)
  • The {{WebExtAPIRef("cookies")}} methods now accept and return milliseconds in the fractional part of expirationDate. (Firefox bug 1972757)
  • Adds the {{WebExtAPIRef("browserAction.onUserSettingsChanged")}} and {{WebExtAPIRef("action.onUserSettingsChanged")}} events that listen for changes in the user-specified settings that affect an extension's action. (Firefox bug 1828220)
  • Adds {{WebExtAPIRef("browserSettings.verticalTabs")}}, which enables extensions to control whether the browser displays the tab bar horizontally or vertically. (Firefox bug 1946600)
  • Enabled the Firefox built-in data collection consent feature for Firefox for Android. See the Extension Workshop article Firefox built-in consent for data collection and transmission. (Firefox bug 1954524)

Experimental web features

  • anchor-size() (Nightly): layout.css.anchor-positioning.enabled

    The CSS {{CSSXRef("anchor-size")}} function enables setting anchor-positioned element's size, position, and margins relative to the dimensions of anchor elements. (Firefox bug 1972610).

  • :heading and :heading(): layout.css.heading-selector.enabled

    The CSS {{CSSXRef(":heading")}} pseudo-class allows you to style all heading elements (<h1>-<h6>) at once rather than targeting them individually. The {{CSSXRef(":heading_function", ":heading()")}} functional pseudo-class allows you to style heading elements that match the given heading levels. (Firefox bug 1974386).

  • view-transition-name: match-element (Nightly): dom.viewTransitions.enabled

    The {{CSSXRef("view-transition-name", "match-element", "#match-element")}} value of the CSS {{CSSXRef("view-transition-name")}} property automatically assigns a unique internal view-transition-name to each selected element, rather than having to name them individually. (Firefox bug 1956141).

  • Integrity-Policy and Integrity-Policy-Report-Only for scripts (Nightly): security.integrity_policy.enabled

    The {{httpheader("Integrity-Policy")}} and {{httpheader("Integrity-Policy-Report-Only")}} HTTP headers are now supported for script resources. These allow websites to either enforce subresource integrity guarantees for scripts or only report violations of the policy, respectively. (Firefox bug 1976656).

  • Integrity-Policy and Integrity-Policy-Report-Only for stylesheets: security.integrity_policy.stylesheet.enabled

    The {{httpheader("Integrity-Policy")}} and {{httpheader("Integrity-Policy-Report-Only")}} HTTP headers are now supported for stylesheet resources. These allow websites to either enforce or only report violations of the policy, respectively. (Firefox bug 1974247).

These features are shipping in Firefox 142 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.