jsdom
31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed
Upgrading jsdom From 1.2.0 to 1.5.0
9 releases in betweenevery note read
Reading releases, release notes and advisories…
Release by release
1.5.0nothing new or fixed in the note
- New
Tweak: Faster implementation of
NodeList.prototype.length, which should speed up common operations likeappendChildand similar.
- New
- Fixed
HTMLInputElement.prototype.checkedanddefaultCheckednow behave per the spec. - Fixed
HTMLOptionElement.prototype.selectednow behaves per the spec. - Fixed
HTMLInputElement.prototype.valuenow behaves per the spec. - Fixed
HTMLTextAreaElement.prototype.valueanddefaultValuenow behave per the spec.
- Fixed
- Fixed
Check if
module.parentexists before using it to construct a document's initial URL. Apparently some testing frameworks like Jest do not correctly emulate the module environment; this compensates.
- Fixed
- Fixed
Changing attributes on
<option>elements will now have the correct consequences. For example changing theidattribute now interacts correctly withdocument.getElementById.
- Fixed
1.2.3 – 1.3.02 releases, nothing new or fixed in the notes
- Fixed
querySelectorAllcorrectly coerces its argument to a string; notably this allows you to pass arrays. - Fixed
The
datasetter on text nodes correctly coerces the new value to a string. - Fixed
document.toString()now returns[object HTMLDocument].
- Fixed
- Fixed
Handling of
<template>element parsing and serialization, now that it is supported by parse5.
- Fixed
5 other lines we could not sort, mostly version bumps
- 1.5.0
Add: Missing
window.consolemethods, viz.assert,clear,count,debug,group,groupCollapse,groupEnd,table,time,timeEnd, andtrace. All exceptassertdo nothing for now, but see #979 for future plans. - 1.5.0
Tweak: Make
childNodes, and the many places in jsdom that use it, much faster. - 1.4.0
Add:
HTMLTextAreaElement.prototype.defaultValuenow has a setter, andHTMLTextAreaElement.prototype.textLengthnow exists. - 1.3.0
Add: Moved
focusandblurmethods toHTMLElement.prototype, instead of having them only be present on certain element prototypes. Our focus story is still not very spec-compliant, but this is a step in the right direction. - 1.2.3
Tweak: Improve performance of
Node.prototype.insertBefore,Node.prototype.removeChild, and severalAttributeListmethods.
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.