jsdom v7.1.0 Release Notes
-
๐ This is a rather large release bringing with it several important re-implementations of DOM and HTML APIs.
- Our
EventTarget
implementation has been rewritten from scratch to follow the spec exactly. This should improve any edge case misbehaviors. - Our
Event
class hierarchy has been rewritten and fleshed out, fixing many gaps in functionality.- Previously missing classes
KeyboardEvent
andTouchEvent
are now implemented. - Almost all supported
Event
subclasses now have constructors. (TouchEvent
does not yet, andMutationEvent
is specified to not have one.) - All classes now have correct public APIs, e.g. getters instead of data properties, missing properties added, and constructors that correctly allow setting all the supported properties.
document.createEvent("customevent", ...)
now correctly creates aCustomEvent
instead of anEvent
, andCustomEvent.prototype.initProgressEvent
has been replaced withCustomEvent.prototype.initCustomEvent
.
- Previously missing classes
- โ
The
Attr
class and related attribute-manipulating methods has been rewritten to follow the latest specification. In particular,Attr
is no longer a subclass ofNode
, and no longer has child text nodes. - โ
The
<template>
element implementation has been greatly improved, now passing most web platform tests. Its.content
property no longer has an extra intermediate document fragment; it no longer has child nodes; and related parts of the parser and serializer have been fixed, includinginnerHTML
andouterHTML
, to now work as specified. querySelector
,querySelectorAll
, andmatches
now correctly throw"SyntaxError"
DOMException
s for invalid selectors, instead of justError
instances.Node.prototype
'sinsertBefore
,replaceChild
, andappendChild
methods now check their arguments more correctly.- ๐ The browser builds now have regained the ability to fetch URLs for content and the like; this had been broken due to an issue with the browser-request package, which is no longer necessary anyway.
- Our