jsdom
31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed
Upgrading jsdom From 8.2.0 to 8.5.0
5 releases in betweenevery note read
- 2
- changes to make
- 0
- advisories fixed
- 7
- new
- 5
- fixes
Before you upgrade
Tick each one off as you go- Breaking8.5.0
- Breaking8.5.0
Release by release
- Breaking
Removed
iframe.sandboxproperty, since it was not implemented and simply crashed when used. - Breaking
Removed
element.sourceIndexproperty, since it was nonstandard (Internet Explorer only). - New
Added encoding handling
- Fixed
Fixed setting proxied inline event handlers, such as
doc.body'sonload=""attribute, for documents that do not have a browsing context.
- Breaking
- Fixed
Fixed an issue where setting
selectedon an multi-select would clear all other selectedness.
- Fixed
- New
Added an implementation of the
TreeWalkerclass (anddocument.createTreeWalker). - Fixed
Fixed a few minor bugs in URL parsing and the
URLAPI, by upgrading towhatwg-urlv2.0.1. - Fixed
Fixed a few issues with generated files in the published package, which seem to have impacted webpack users.
- New
- Fixed
Fixed an issue where if you modified
Object.prototype, spurious attributes would show up on your jsdom nodes.
- Fixed
- New
img.naturalWidth,img.naturalHeight,img.width,img.height,img.complete, andimg.currentSrcwill update themselves correctly as the image loads - New
loadanderrorevents will fire on the<img>element, according to how well image decoding goes. - New
You can draw images onto canvases, using the newly-enabled
canvasContext.drawImageAPI. - New
Added
canvasContext.createPatternandcanvasContext.toBlob, when thecanvasnpm package is installed. - New
Added a basic implementation of the Page Visibility API, in particular a
document.hiddenproperty that always returnstrue, and adocument.visibilityStateproperty that always returns"prerender". This is a more standard alternative to our proprietarynavigator.noUI, which will be removed whenever we release v9.0.0.
- New
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.