jsdom
31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed
8.5.0 is the newest release of 8.x.
In short
4 new9 fixed3 changed
Release note
Added
attr.nodeName, which was recently re-added to the spec.Added click-proxying behavior from
<label>s to their labeled form elements.Added a setter for
element.classListper recent spec changes (it forwards toelement.classList.value).Updated our attributes implementation in a few ways for recent spec changes and to fix discovered bugs:
Added
element.getAttributeNames(). (spec addition)setAttributeNodeandsetAttributeNodeNScan now replace an attribute node, instead of removing the old one and adding a new one; this avoids changing the order in the attribute list. (spec change)NamedNodeMapnamed properties are now lowercase (except in edge cases involving XML documents or non-HTML elements). (spec change)NamedNodeMapnamed properties are now non-enumerable.The
"DOMAttrModified"mutation event'srelatedNodeis now the newAttrobject, not theNode, as per spec.
Updated
DOMTokenListto have avalueproperty per recent spec changes; itstoStringserialization also changed slightly.Updated
tc.headersto be aDOMTokenListthat simply reflects theheadersattribute; previously it was a string, with its computation doing some weird stuff.Fixed
document.implementation.createDocument()to create a document with its parsing mode set to XML, which affects a variety of DOM APIs in small ways.Fixed
EventTarget.prototype.constructorto be correct; it was previouslyWindow.Fixed
option.indexfor<option>s not inside a<select>to no longer error.Fixed
tc.cellIndexfor<td>s and<th>s not inside a<tr>to no longer error.Fixed
tr.sectionRowIndexfor<tr>s not inside a<table>,<tbody>,<thead>, or<tfoot>to no longer error.Removed the
"keyevents"alias for"keyboardevent"when usingdocument.createEvent, per recent spec changes.
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.