jsdom
31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed
30.1.3 is the newest release of 30.x.
In short
13 fixed
Release note
Fixed spurious window
blurandfocusoutevents and incorrectevent.relatedTargetvalues when focusing an element after removing the previously focused element, which regressed in v30.1.0.Fixed focus and blur behavior across frames, and focusing the document's viewport through
document.documentElement.focus().Fixed focus targets removed or disabled by
blurlisteners becoming active, and text selections made by focus and blur listeners being overwritten.Fixed
element.focus()incorrectly focusing disabled form controls and<input type="hidden">elements withtabindex="".Fixed invalid
style.setProperty()calls changing existing!importantpriorities, serialized styles, or mutation records.Fixed
!importanthandling when updating CSS longhands after shorthands, using variables or CSS-wide keywords, and assigning style properties directly.Fixed
<noscript>parsing withincludeNodeLocations: trueor inside frames to honor therunScriptsoption.Fixed the
storageQuotaoption being ignored by frames.Fixed encoding detection of HTML and XML byte input to honor XML encoding declarations and detect UTF-16 without a byte order mark.
Fixed exceptions caused by truncated
charsetparameters in<meta>elements, and encoding detection incorrectly using incomplete<meta>tags.Fixed XML serialization errors for namespaces named
constructor,toString,__proto__, or"null", and incorrect reuse of namespace prefixes declared on sibling elements.Fixed
element.innerHTMLandelement.outerHTMLin XML documents to reject invalid characters in attribute values and avoid stack overflows on large strings.Fixed selector matching for
:lang(),:nth-child(... of ...)after mutations, and:has()with duplicate IDs or nested logical pseudo-classes.
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.