A JavaScript implementation of various web standards, for use with Node.js
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:
input.maxLength
, input.minLength
, input.size
, progress.max
, tableCell.colSpan
, tableCell.rowSpan
, tableCol.span
, textArea.cols
, textArea.maxLength
, textArea.minLength
, textArea.rows
.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.
ElementInternals
, including the shadowRoot
getter and the string-valued ARIA properties. (zjffun)Element
.history.pushState()
and history.replaceState()
to follow the latest specification, notably with regards to how they handle empty string inputs and what new URLs are possible.input.valueAsANumber
setter to handle NaN
correctly. (alexandertrefz)cssstyle
which contains several bug fixes.canvas
peer dependency introduced in v23.0.0.whatwg-url
which integrates various additions to the URL
and URLSearchParams
objects.crypto.randomUUID()
. (jamesbvaughan)DOMRect
and DOMRectReadOnly
.AbortSignal.timeout()
.abortSignal.throwIfAborted()
.submitter
argument to the FormData
constructor. (jenseng)getComputedStyle()
's results for color-based properties, to resolve named colors and attempt to provide initial inheritance support. (hoekz-wwt)Window
's event handler properties (e.g. oncopy
, ontouchstart
, etc.) to reflect the latest list from the standard.DOMParser
-created documents to inherit their URL from the creating document.setRangeText()
used on <input>
and <textarea>
elements to calculate the new end index correctly. (pmstss)pageX
, pageY
, offsetX
, and offsetY
on MouseEvent
s during dispatch. (jenseng)nwsapi
to v2.2.4, bringing along various fixes to our selector engine.jsdom.reconfigure()
to also adjust the URL as seen by the history API, so that e.g. history.replaceState(null, "")
would not mess up the URL. (jdufresne)location.hash = ""
to leave any #
in location.href.cssom
with rweb-cssom
, since the latter is maintained. (seanparmelee)x
, y
, pageX
, pageY
, offsetX
, and offsetY
to MouseEvent
. (jenseng, ViniciusFXavier)unset
with getComputedStyle()
. (jsnajdr)submitter
property to SubmitEvent
. (jenseng)MouseEvent
's screenX
and screenY
to no longer coerce to integers, allowing fractional values. (jenseng)formEl.submit()
to not longer fire submit
events. (jenseng)<link>
is removed. (jsnajdr)pointer-events
to inherit when used with getComputedStyle()
. (jsnajdr)<script>
elements with no src=""
to no longer fire load
events. (t1ger2080)getComputedStyle()
to cache its results, which should make it much faster. (jsnajdr)