files/en-us/mozilla/firefox/releases/142/index.md
This article provides information about the changes in Firefox 142 that affect developers. Firefox 142 was released on August 19, 2025.
codebase attribute. Use the data attribute instead. (See Firefox bug 1973900 for more details.)& selector inside {{cssxref("@scope")}} no longer inherits the specificity of the scope start selector.
This makes & selectors in @scope consistent with CSS nesting, avoiding unexpected specificity differences (see CSS nesting and specificity).
(Firefox bug 1975531).No notable changes.
webkitdirectory attribute) and {{domxref("File.webkitRelativePath")}} properties on Firefox Android.
This lets you configure an <input type="file"> element to accept directories instead of files (Firefox bug 1973726).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).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).emulation.setLocaleOverride command which allows clients to override a locale in JavaScript APIs (Firefox bug 1968952).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).browsingContext.create would fail after a browsingContext.print command was interrupted by closing a tab with the browsingContext.close command (Firefox bug 1841125).session.end command to resume all requests which were blocked by network interceptions (Firefox bug 1974426).WebDriver:AddCookie command to throw an error when a target cookie has sameSite=none and secure=false attributes (Firefox bug 1977205).unexpected alert open error message, since the dialog text is available now via the data field (Firefox bug 1948236).expirationDate. (Firefox bug 1972757)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.