Changes since 26.1.0
- Node.js v20 is now the minimum supported version.
- Added a variety of event constructors, even though we do not implement their associated specifications or ever fire them:
BeforeUnloadEvent
,BlobEvent
,DeviceMotionEvent
(omittingrequestPermission()
),DeviceOrientationEvent
(omittingrequestPermission()
),PointerEvent
,PromiseRejectionEvent
, andTransitionEvent
. - Added
movementX
andmovementY
toMouseEvent
. (These are from the Pointer Lock specification, the rest of which is not implemented.) - Added
customElements.getName()
. (mash-graz) - Updated the virtual console:
"jsdomError"
events are now documented, with specifictype
properties and other properties that depend on the type.sendTo()
was renamed toforwardTo()
.- The
jsdomErrors
option toforwardTo()
can be used to control which errors are sent to the Node.js console. This replaces the previousomitJSDOMErrors
boolean option. "jsdomError"
s for failedXMLHttpRequest
fetches are no longer emitted.- The values that are printed when forwarding
"jsdomError"
s to the Node.js console are streamlined.
- Switched our CSS selector engine from
nwsapi
to@asamuzakjp/dom-selector
, closing over 20 selector-related bugs. - Upgraded
tough-cookie
, which now considers URLs likehttp://localhost/
to be secure contexts (per the spec), and thus will returnSecure
-flagged cookies for such URLs. (colincasey) - Upgraded
cssstyle
, which brings along many improvements and fixes to theCSSStyleDeclaration
object and its properties. - Updated the user agent stylesheet to be derived from the HTML Standard, instead of from an old revision of Chromium.
- Changed
element.click()
to fire aPointerEvent
instead of aMouseEvent
. - Changed certain events to be passive by default.
- Changed the
<input>
element'spattern=""
attribute to use thev
regular expression flag, instead ofu
. - Fixed many specification conformance issues with the
Window
object, including named properties and changing various data properties to accessor properties. - Fixed
document.createEvent()
to accept a more correct set of event names. - Fixed the
ElementInternals
accessibility getters and setters. (They were introduced in v23.1.0, but due to inadequate test coverage never actually worked.) - Fixed using
Object.defineProperty()
on certain objects, such asHTMLSelectElement
instances. - Fixed
jsdom.reconfigure({ url })
not updatingdocument.baseURI
or properties derived from it. (This regressed in v26.1.0.) - Fixed CSS system colors, as well as the
initial
,inherit
, andunset
keywords, to resolve correctly. (asamuzaK) - Fixed CSS
display
style resolution. (asamuzaK)
Changes since 27.0.0-beta.3
- Upgraded
cssstyle
, which brings along various CSS parsing fixes.