Breaking changes:
- Node.js v22.13.0+ is now the minimum supported v22 version (was v22.12.0+).
Other changes:
- Overhauled the CSSOM implementation, replacing the
@acemir/cssomandcssstyledependencies with fresh internal implementations built on webidl2js wrappers and thecss-treeparser. Serialization, parsing, and API behavior is improved in various ways, especially around edge cases. - Added
CSSCounterStyleRuleandCSSNamespaceRuleto jsdomWindows. - Added
cssMediaRule.matchesandcssSupportsRule.matchesgetters. - Added proper media query parsing in
MediaList, usingcss-treeinstead of naive comma-splitting. Invalid queries become"not all"per spec. - Added
cssKeyframeRule.keyTextgetter/setter validation. - Added
cssStyleRule.selectorTextsetter validation: invalid selectors are now rejected. - Added
styleSheet.ownerNode,styleSheet.href, andstyleSheet.title. - Added bad port blocking per the fetch specification, preventing fetches to commonly-abused ports.
- Improved
Documentinitialization performance by lazily initializing the CSS selector engine, avoiding ~0.5 ms of overhead perDocument. (thypon) - Fixed a memory leak when stylesheets were removed from the document.
- Fixed
CSSStyleDeclarationmodifications to properly trigger custom element reactions. - Fixed nested
@mediarule parsing. - Fixed
CSSStyleSheet's "disallow modification" flag not being checked in all mutation methods. - Fixed
XMLHttpRequest'sresponsegetter returning parsed JSON during theLOADINGstate instead ofnull. - Fixed
getComputedStyle()crashing in XHTML documents when stylesheets contained at-rules such as@pageor@font-face. - Fixed a potential hang in synchronous
XMLHttpRequestcaused by a race condition with the worker thread's idle timeout.