jsdom
31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed
21.1.2 is the newest release of 21.x.
In short
2 new5 fixed
Release note
A potentially-breaking bug fix:
Fixed the
window,document,location, andtopproperties ofWindowto be non-configurable.
Other changes:
Added support for
<input type=image>submitting forms.Added the
locationsetter to theWindowobject, which forwards to thelocation.hrefsetter. Setting the URL is still only implemented for fragment navigations, however.Fixed
defer=""<script>elements that are added afterDOMContentLoadedto execute, instead of being skipped.Fixed
selectElement.selectedOptionsbeing incorrect whenoptionElement.selectedis set. This was a regression introduced in v20.0.1. Unfortunately this also reverts the performance improvement when appending<option>elements that was introduced then.Fixed the
self,locationbar,menubar,personalbar,scrollbars,statusbar,toolbar,frames,parent,external,length, andscreenproperties ofWindowto be replaceable: that is, setting them will override their values, instead of having the new value be ignored.Fixed a few issues with
JSDOM.fromURL()in the browser build of jsdom.
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.