jsdom
31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed
Upgrading jsdom From 11.4.0 to 11.12.0
11 releases in betweennotes for 10
Reading releases, release notes and advisories…
- 1+
- change to make
- 0
- advisories fixed
- 21+
- new
- 25+
- fixes
Counted from 10 of 11 release notes. Advisories are counted from the advisory database, in full.
Before you upgrade
Tick each one off as you go- Breaking11.6.0
Release by release
- New
Added
window.localStorage,window.sessionStorage, andStorageEventsupport. These are currently only stored in-memory; file an issue if you need persistent (on-disk) storage capability so we can discuss adding that. This feature includes the newstorageQuotaoption for controlling how much can be stored. - New
Added
element.closest(). - Fixed
Fixed the old API in Node.js v10 to not throw, when given input that is not a valid file path (such as a typical HTML string).
- New
- New
Added
node.getRootNode(). - New
Added
label.control. - New
Added
el.labelsfor form control elements. - Fixed
Fixed the
contentTypeofDocuments created through<iframe>s. - Fixed
Fixed the
contentTypeandoriginofDocuments created throughdocument.implementation.createDocument(). - Fixed
Fixed
sourceEl.srcsetto return the value of thesrcset=""attribute, instead of thecite=""attribute. - Fixed
Fixed
node.normalize()to not modify non-Textnodes.
- New
- New
Added
event.srcElementandevent.returnValue. - Fixed
Fixed
XMLHttpRequestto correctly set the User-Agent header, and set it on CORS preflight requests.
- New
- New
Added
node.lookupPrefix(),node.lookupNamespaceURI()andnode.isDefaultNamespace(). - Fixed
Fixed the cloning of
Documents; previously it would not clone all of the appropriate state, and would sometimes add an extra document type node. - Fixed
Fixed various edge cases in the
textContentandnodeValueproperties. - Fixed
Fixed
canvas.toBlob()to properly pass through the JPEG quality argument, instead of always passing zero tonode-canvas.
- New
- New
Added the full constraint validation API, i.e.
willValidate,validity,validationMessage,checkValidity(),reportValidity(), andsetCustomValidity(), onHTMLButtonElement,HTMLFieldSetElement,HTMLFormElement,HTMLInputElement,HTMLObjectElement,HTMLOutputElement,HTMLSelectElement, andHTMLTextAreaElement. - New
Added
getElementById()toDocumentFragment.
- New
- New
Added the boolean return value to
DOMTokenList'sreplace()method, per the recent spec addition. - New
Added
FileReader'sreadAsBinaryString()method, as it has been added back to the specification. - Fixed
Fixed event handlers to be own properties of each
Window, instead of onWindow.prototype. - Fixed
Fixed an exception that would sometimes get raised when removing an
<img>element'ssrc=""attribute. - Fixed
Fixed
abortevents onAbortSignals to have theirisTrustedset to true. - Fixed
Fixed some argument conversions in
XMLHttpRequest'sopen()method.
- New
- Fixed
Fixed another regression (since v11.6.0) in
<style>elements, where they would omit a series of parsingjsdomErrorevents for any style sheet text containing spaces.
- Fixed
- Fixed
Fixed one regression (since v11.6.0) in
<style>elements, where theirsheetproperty would sometimes benullwhen it should not be. - Fixed
Fixed a case where a
<style>element'ssheetproperty would be left as aCSSStyleSheetdespite it not being in the document.
- Fixed
11 other lines we could not sort, mostly version bumps
- 11.12.0
Changed
hashchangeandpopstateevents to no longer bubble, per a specification update. - 11.12.0
Upgraded
cssstyleto v1.0.0, bringing along various fixes to our CSS parser and object model. - 11.12.0
Upgraded
nwsapito v2.0.7, bringing along various fixes to our selector engine. - 11.11.0
Upgraded
cssstyleto v0.3.1, bringing along various fixes to our CSS parser and object model. - 11.11.0
Upgraded
whatwg-urlto v6.4.1, fixing the interaction ofURL'shrefandsearchParamsproperties. - 11.11.0
Upgraded our selector matching engine from
nwsmatchertonwsapi, bringing along extensive fixes, performance improvements, and additional selector support. - 11.7.0
Improved MIME type and
data:URL parsing throughout jsdom, by using the newwhatwg-mimetypeanddata-urlspackages. - 11.7.0
Removed some unnecessary
.webidlfiles that were included in the npm package. - 11.6.2
Generally improved the spec-conformance of when
<style>and<script>elements are evaluated; for example,<script>elements inserted byinnerHTMLare no longer evaluated. - 11.6.0
Increased the performance of parsing HTML documents with large numbers of sibling elements.
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.