Firefox 142 for developers
This article provides information about the changes in Firefox 142 that affect developers. Firefox 142 is the current Beta version of Firefox and ships on August 19, 2025.
Note: The release notes for this Firefox version are still a work in progress.
Changes for web developers
HTML
Removals
- The
<object>
element no longer supports the deprecatedcodebase
attribute. Use thedata
attribute instead. (See Firefox bug 1973900 for more details.)
APIs
DOM
- The
Selection.getComposedRanges()
method is now supported, allowing developers to accurately get selected text ranges across shadow DOM boundaries. In addition, the methodssetBaseAndExtent()
,collapse()
, andextend()
of theSelection
interface have been modified to accept nodes inside a shadow root. (Firefox bug 1903870).
Changes for add-on developers
- Cookies created with
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)
Experimental web features
-
anchor-size()
(Nightly):layout.css.anchor-positioning.enabled
The CSS
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.anchor-positioning.enabled
The CSS
:heading
pseudo-class allows you to style all heading elements (<h1>
-<h6>
) at once rather than targeting them individually. The:heading()
functional pseudo-class allows you to style heading elements with the<An+B>
syntax. (Firefox bug 1974386).
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.