jsdom
31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed
Upgrading jsdom From 9.2.0 to 9.12.0
21 releases in betweenevery note read
- 1
- change to make
- 0
- advisories fixed
- 23
- new
- 48
- fixes
Before you upgrade
Tick each one off as you go- Breaking9.4.2
Release by release
- New
Added the
Optionnamed constructor. - New
Added support for the
canvas-prebuiltnpm package as an alternative tocanvas. - Fixed
Fixed
setTimeout()andsetInterval()to always return a positive integer, instead of returning0the first time were called. - Fixed
Fixed
jsdom.env()to preserve URL fragments across redirects. - Fixed
Fixed
optionEl.textandoptionEl.valueto be more spec-compliant. - Fixed
Fixed
event.stopImmediatePropagation()to actually stop immediate propagation, not just propagation. - Fixed
Fixed
clearTimeout()andclearInterval()to work correctly when using jsdom browserified.
- New
- New
Added dummy properties
offsetTop,offsetLeft,offsetWidth, andoffsetHeightthat always return0, andoffsetParentwhich always returnsnull, for all HTML elements. - Fixed
Fixed various edge cases in our type conversions applied to method arguments and setters throughout the web platform APIs implemented by jsdom.
- New
- New
Added
forEach,keys,values, andentriesmethods toNodeList. - New
Added
event.cancelBubble. - New
Added dummy properties
scrollWidth,scrollHeight,clientTop,clientLeft,clientWidth, andclientHeightthat always return0to all elements. - Fixed
Fixed the progress and readystatechange events fired by
XMLHttpRequestto match recent specification changes and test updates. - Fixed
Fixed
element.getClientRects()to return an empty array, instead of an array containing a dummy bounding box.
- New
9.9.1nothing new or fixed in the note
- New
Added
CDATASectionnodes, includingdocument.createCDATASection. - New
Added
node.wholeText. - New
Added a setter for
document.body. - New
Added
document.embeds,document.plugsin, anddocument.scripts. These were supposed to be added in 9.5.0 but were mistakenly omitted.
- New
- Fixed
Fixed syntax errors in Node.js v4.
- Fixed
- Fixed
Fixed
DOMTokenListandgetElementsByClassNameto only split on ASCII whitespace, not all Unicode whitespace.
- Fixed
- Fixed
Fixed an error that occurred when passing no class names to
getElementsByClassName, e.g.getElementsByClassName("")orgetElementsByClassName(" ").
- Fixed
10 other lines we could not sort, mostly version bumps
- 9.10.0
Updated many aspects of
Blob,File, andFileReaderto better match the File API specification. - 9.10.0
Changed
navigator.vendorto return"Apple Computer, Inc."instead of"Google Inc.", since we have chosen the WebKit navigator compatibility mode. - 9.9.1
Removed the use of
array.includesto fix a compatibility issue with Node.js v4. - 9.6.0
Tweaked
XMLHttpRequestprogress event ordering slightly to better match the spec and browsers. - 9.6.0
Tweaked the behavior of calling
event.stopPropagationandevent.stopImmediatePropagationon already-dispatched events, per the latest changes to the DOM Standard. - 9.4.0
Updated our elements-being-disabled semantics to more closely match the spec, in particular with regard to being descendants of
<fieldset disabled>. - 9.4.0
Updated
FormDatafor recent spec fixes: blobs, files, and filenames should now all work like you'd expect. - 9.4.0
Updated the
FormDataconstructor to use the proper, rather-complex, constructing the form data set algorithm. - 9.3.0
Made submit buttons and labels respond to click event cancelation correctly, preventing form submission and re-dispatching to the relevant form control.
- 9.2.1
Updated
cssstyleminimum version to ensure all jsdom installs (not just fresh ones) get the benefit ofcssstyle's recently-betterbackgroundandwidthsetters.
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.