jsdom
31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed
Upgrading jsdom From 4.0.0 to 4.5.2
12 releases in betweennotes for 11
Release by release
4.5.1 – 4.5.22 releases, nothing new or fixed; 1 without a note
- New
Added
document.currentScript.
- New
4.4.0nothing new or fixed in the note
- New
Added
defaultPreventedproperty toEventinstances, reflecting whetherev.preventDefault()has been called.
- New
- New
Added a second parameter to
UIEvent,MouseEvent, andMutationEvent, which for now just behaves the same as that forEvent.
- New
- New
Added a second parameter to the
Eventconstructor, which allows you to set thebubblesandcancelableproperties.
- New
- New
Added
HTMLUnknownElementand fix the parser/document.createElementto create those instead ofHTMLElementfor unknown elements. - Fixed
Fixed issues with named and indexed properties on
window, as well aswindow.length, with regard to<frame>s/<iframe>s being added and removed from the document.
- New
- Fixed
Fixed parsing of doctypes by relying on the information provided by the html parser if possible.
- Fixed
13 other lines we could not sort, mostly version bumps
- 4.5.1
Removed unnecessary browserify dependency that was erroneously included in 4.5.0.
- 4.4.0
All resources are now loaded with the request package, which means that e.g. GZIPped resources will be properly uncompressed, redirects will be followed, and more. This was previously the case only for URLs passed directly to
jsdom.env, and not for sub-resources inside the resulting page. - 4.3.0
Made the click behavior for radio buttons and checkboxes work when doing
el.dispatchEvent(clickEvent), not just when doingel.click(). - 4.3.0
Moved the
click()method fromHTMLInputElement.prototypetoHTMLElement.prototype, per the latest spec. - 4.3.0
Made the
click()method trigger aMouseEventinstead of just anEvent. - 4.0.2
EventTargetis now correctly in the prototype chain ofWindow. - 4.0.2
EventTargetargument validation is now correct according to the DOM Standard. - 4.0.2
DOMExceptionnow behaves more like it should per Web IDL. In particular it has a more comprehensive set of constants, and instances now havenameproperties. - 4.0.2
new Event("click")can now be dispatched. - 4.0.2
document.createEventnow behaves more like it should according to the DOM Standard: it accepts a wider range of arguments, but will throw if an invalid one is given.
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.