jsdom
31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed
7.2.2 is the newest release of 7.x.
In short
4 new2 fixed7 changed
Release note
This major release has as its headlining feature a completely re-written XMLHttpRequest implementation, in a heroic effort
Node.js 4.0 onward is now required, as we have begun using ES2015 features only present there.
Completely re-implemented
XMLHttpRequestand related classes (nicolashenry):Includes support for
Blob,File,FileList,FileReader,FormData,ProgressEvent, and the supportingXMLHttpRequestUpload, andXMLHttpRequestEventTargetinterfaces.Includes support for synchronous XHRs.
Adds some new request-management abilities, documented in the readme. In short, the
pool,agentOptions, anduserAgentoptions are new, and resource loads can now be aborted.These implementations are extremely complete and standards-compliant, passing 136 newly-introduced web platform tests.
Added
document.charset, an alias fordocument.characterSet.Added
HTMLTemplateElement.prototype.content, for getting the contents of a<template>element as a document fragment.Implemented "loose" cookie parsing, giving correct execution of code like
document.cookie = "foo".Several fixes related to event dispatching and creation, including the addition of
Event.prototype.stopImmediatePropagationand the constantsNONE,CAPTURING_PHASE,AT_TARGET, andBUBBLING_PHASE. This accounted for another 15 newly-passing web platform tests.Fixed
document.styleSheetsto correctly track the removal of stylesheets from the document.Fixed the
createdjsdom lifecycle callback receiving a differentwindowobject than theloadedordonecallbacks when scripting was enabled.Invalid URLs are no longer allowed when creating a jsdom document; the URL must be parseable, or an error will be thrown.
The
{ omitJsdomErrors }option of the virtual console has moved; it is no longer provided when creating the virtual console, but instead when callingsendTo.
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.