jsdom
31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed
5.6.1 is the newest release of 5.x.
In short
1 new8 fixed
Release note
Added
postMessagesupport, for communicating between parent windows, iframes, and combinations thereof. It's missing a few semantics, especially around origins, as well as MessageEvent source. Objects are not yet structured cloned, but instead passed by reference. But it's working, and awesome!Rewrote cloning code (underlying
cloneNodeandimportNode), fixing a number of issues:Elements with weird tag names, of the type that only the parser can normally create, can now be cloned
Doctypes can now be cloned, per the latest spec.
Attrs cannot be cloned, per the latest spec (although they still have a
cloneNodemethod for now due to legacy).Document clones now correctly copy over the URL and content-type.
Fixed any virtual console output from iframes to be proxied to the parent window's virtual console.
Fixed the
typeproperty of<button>elements to correctly default tosubmit, and to stay within the allowed range.Fixed clicking on submit
<button>s to submit their containing form; previously only<input type="submit">worked.Fixed
document.open()to returnthis, per spec.
Additionally, Joris-van-der-Wel added a benchmarking framework, and a number of benchmarks, which should help us avoid performance regressions going forward, and also make targeted performance fixes. We're already investigating some real-world issues using this framework. Very exciting!
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.