Releases: jsdom/jsdom
Version 26.0.0
Breaking change: canvas
peer dependency requirement has been upgraded from v2 to v3. (sebastianwachter)
Other changes:
- Added
AbortSignal.any()
. (jdbevan) - Added initial support for form-associated custom elements, in particular making them labelable and supporting the
ElementInternals
labels
property. The form-associated callbacks are not yet supported. (hesxenon) - Updated
whatwg-url
, adding support forURL.parse()
. - Updated
cssstyle
andrrweb-cssom
, to improve CSS parsing capabilities. - Updated
nwsapi
, improving CSS selector matching. - Updated
parse5
, fixing a bug around<noframes>
elements and HTML entity decoding. - Fixed
JSDOM.fromURL()
to properly reject the returned promise if the server redirects to an invalid URL, instead of causing an uncaught exception.
Version 25.0.1
- Updated dependencies, notably
tough-cookie
, which no longer prints a deprecation warning.
Version 25.0.0
This major release changes the prototype of a jsdom's EventTarget.prototype
to point to the Object.prototype
inside the jsdom, instead of pointing to the Node.js Object.prototype
. Thus, the prototype chain of Window
stays entirely within the jsdom, never crossing over into the Node.js realm.
This only occurs when runScripts
is set to non-default values of "dangerously"
or "outside-only"
, as with the default value, there is no separate Object.prototype
inside the jsdom.
This will likely not impact many programs, but could cause some changes in instanceof
behavior, and so out of an abundance of caution, we're releasing it as a new major version.
Version 24.1.3
- Fixed calls to
postMessage()
that were done as a bare property (i.e.,postMessage()
instead ofwindow.postMessage()
).
Version 24.1.2
- Fixed an issue with the
in
operator applied toEventTarget
methods, e.g.'addEventListener' in window
, which only appeared in Node.js ≥22.5.0. (legendecas) - Fixed the events fired by
blur()
: it no longer firesfocus
andfocusin
on theDocument
, andblur
andfocusout
no longer have theirrelatedTarget
property set. (asamuzaK)
Version 24.1.1
- Fixed selection methods to trigger the
selectionchange
event on theDocument
object. (piotr-oles)
Version 24.1.0
- Added the
getSetCookie()
method to theHeaders
class. (ushiboy) - Fixed the creation and parsing of elements with names from
Object.prototype
, like"constructor"
or"toString"
. - Updated
rweb-cssom
, which can now parse additional CSS constructs.
Version 24.0.0
This release reverts our selector engine back to nwsapi
. As discussed in #3659, the performance regressions from @asamuzakjp/dom-selector
turned out to be higher than anticipated. In the future, we can revisit @asamuzakjp/dom-selector
after it reaches nwsapi
's performance on the two real-world benchmarks provided by the community.
Since reverting to nwsapi
causes several functionality regressions, e.g. removing :has()
support, we've decided to make this a major version.
Additionally:
- Small fixes to edge-case behavior of the following properties:
input.maxLength
,input.minLength
,input.size
,progress.max
,tableCell.colSpan
,tableCell.rowSpan
,tableCol.span
,textArea.cols
,textArea.maxLength
,textArea.minLength
,textArea.rows
.
Version 23.2.0
This release switches our CSS selector engine from nwsapi
to @asamuzakjp/dom-selector
. The new engine is more actively maintained, and supports many new selectors: see the package's documentation for the full list. It also works better with shadow trees.
There is a potential of a performance regression due to this change. In our stress test benchmark, which runs most of these 273 selectors against this 128 KiB document, the new engine completes the benchmark only 0.25x as fast. However, we're hopeful that in more moderate usage this will not be a significant issue. Any help speeding up @asamuzakjp/dom-selector
is appreciated, and feel free to open an issue if this has had a significant impact on your project.
Version 23.1.0
- Added an initial implementation of
ElementInternals
, including theshadowRoot
getter and the string-valued ARIA properties. (zjffun) - Added the string-valued ARIA attribute-reflecting properties to
Element
. - Fixed
history.pushState()
andhistory.replaceState()
to follow the latest specification, notably with regards to how they handle empty string inputs and what new URLs are possible. - Fixed the
input.valueAsANumber
setter to handleNaN
correctly. (alexandertrefz) - Updated various dependencies, including
cssstyle
which contains several bug fixes.