jsdom
31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed
9.12.0 is the newest release of 9.x.
In short
6 new7 fixed3 changed
Release note
Added the
DOMParserAPI. It is spec-compliant, including producing<parsererror>elements, except that the produced documents do not have the same URL as the creating document (they instead always have"about:blank").Added strict XML parsing when using
parsingMode: "xml". Creating documents will now fail, just like in a browser, when ill-formed XHTML markup is used.Added some rudimentary application of XML
<!ENTITYdeclarations.Added
window.frameElement, although without appropriate cross-origin security checks.Added the
jsdom.evalVMScriptpublic API.Added more custom request agent support: you can now pass
agentandagentClassin addition toagentOptions.Updated our elements-being-disabled semantics to more closely match the spec, in particular with regard to being descendants of
<fieldset disabled>.Updated
FormDatafor recent spec fixes: blobs, files, and filenames should now all work like you'd expect.Updated the
FormDataconstructor to use the proper, rather-complex, constructing the form data set algorithm.Fixed all constructors that appears as globals on the jsdom
windowobject to be non-enumerable.Fixed
<script>elements to load when they gain asrcattribute while in a document.Fixed
<link rel="stylesheet">elements to load when theirhrefattributes change while in a document.Fixed the loading of external
<img>s (when thecanvasnpm package is installed) that were specified via relative URL; this regressed in 9.2.1.Fixed
<iframe>documents to have the correctreferrervalue (viz. the URL of their parent).Fixed the value of
input.checkedinsideclickevents on checkboxes.Fixed the window object's named properties to correctly return the
<iframe>element or the<iframe>'s window in appropriate scenarios involvingnamevs.idattributes on the<iframe>.
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.