jsdom
31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed
9.12.0 is the newest release of 9.x.
In short
3 new2 fixed2 changed
Release note
This major release removes jsdom's support for mutation events. Mutation events were never well-specified, and the modern DOM Standard omits them in the hopes that they can be removed from browsers (although this has not yet happened in major browser engines). We had hoped to implement their modern alternative, mutation observers, before performing this removal, to give jsdom users the same capabilities.
However, recent performance investigations revealed that mutation events were the major bottleneck in most jsdom operations; tools like ecmarkup which make heavy use of jsdom had their running time halved by removing mutation events, which add serious overhead to every DOM mutation. As such, we are doing a major release with them removed, so that jsdom users can benefit from this massive performance gain.
Mutation observer support is in progress; please use the GitHub reactions feature to vote on that issue if you are impacted by this removal and are hoping for mutation observer support to replace it.
Your normal change log follows:
Removed mutation events, as discussed above.
Added the
DOMTokenList.prototype.replacemethod.Updated
DOMTokenList.prototype.containsto no longer validate its arguments, as per the latest spec.Made various improvements to XMLHttpRequest (nicolashenry):
Added the
responseURLproperty.Updated methods, headers, and header values to use the
ByteStringalgorithm.Fixed the default
statusTextto be""instead of"OK".
Fixed the
Blobconstructor'stypevalidation.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.