Releases: jsdom/jsdom
Releases · jsdom/jsdom
v29.1.1
v29.1.0
v29.0.2
- Significantly improved and sped up
getComputedStyle(). Computed value rules are now applied across a broader set of properties, and include fixes related to inheritance, defaulting keywords, custom properties, and color-related values such ascurrentcolorand system colors. (@asamuzaK) - Fixed CSS
'background' and'border'shorthand parsing. (@asamuzaK)
v29.0.1
v29.0.0
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.
v28.1.0
- Added
blob.text(),blob.arrayBuffer(), andblob.bytes()methods. - Improved
getComputedStyle()to account for CSS specificity when multiple rules apply. (@asamuzaK) - Improved synchronous
XMLHttpRequestperformance by using a persistent worker thread, avoiding ~400ms of setup overhead on every synchronous request after the first one. - Improved performance of
node.getRootNode(),node.isConnected, andevent.dispatchEvent()by caching the root node of document-connected trees. - Fixed
getComputedStyle()to correctly handle!importantpriority. (@asamuzaK) - Fixed
document.getElementById()to return the first element in tree order when multiple elements share the same ID. - Fixed
<svg>elements to no longer incorrectly proxy event handlers to theWindow. - Fixed
FileReaderevent timing andfileReader.resultstate to more closely follow the spec. - Fixed a potential hang when synchronous
XMLHttpRequestencountered dispatch errors. - Fixed compatibility with environments where Node.js's built-in
fetch()has been used before importing jsdom, by working around undici v6/v7 incompatibilities.
v28.0.0
- Overhauled resource loading customization. See the new README for details on the new API.
- Added MIME type sniffing to
<iframe>and<frame>loads. - Regression:
WebSockets are no longer correctly throttled to one connection per origin. This is a result of the bug at nodejs/undici#4743. - Fixed decoding of the query components of
<a>and<area>elements in non-UTF-8 documents. - Fixed
XMLHttpRequestfetches andWebSocketupgrade requests to be interceptable by the new customizable resource loading. (Except synchronousXMLHttpRequests.) - Fixed the referrer of a document to be set correctly when redirects are involved; it is now the initiating page, not the last hop in the redirect chain.
- Fixed correctness bugs when passing
ArrayBuffers or typed arrays to various APIs, where they would not correctly snapshot the data. - Fixed
require("url").parse()deprecation warning when usingWebSockets. - Fixed
<iframe>,<frame>, and<img>(whencanvasis installed) to fireloadevents, noterrorevents, on non-OK HTTP responses. - Fixed many small issues in
XMLHttpRequest.
v27.4.0
- Added
TextEncoderandTextDecoder. - Improved decoding of HTML bytes by using the new
@exodus/bytespackage; it is now much more correct. (@ChALkeR) - Improved decoding of XML bytes to use UTF-8 more often, instead of sniffing for
<meta charset>or using the parent frame's encoding. - Fixed a memory leak when
Ranges were used and then the elements referred to by those ranges were removed.
v27.3.0
v27.2.0
- Added
CSSGroupingRule,CSSNestedDeclarations,CSSConditionRule,CSSContainerRule,CSSScopeRule,CSSSupportsRule,CSSLayerBlockRule, andCSSLayerStatementRuleto jsdomWindows. (@acemir) - Improved CSS parsing and CSSOM object APIs via updates to
@acemir/cssom. (@acemir) - Fixed
@import-ed stylesheets to be properly exposed to CSSOM, and not to overwrite the sheet created from the<link>or<style>element. (@acemir)