jsdom
31.0.1 · 13 Nov 2026MIT166.2M / weekRepositoryHomepagenpmAtom feed
Upgrading jsdom From 0.2.9 to 0.11.1
55 releases in betweenevery note read
- 3
- changes to make
- 0
- advisories fixed
- 6
- new
- 101
- fixes
Before you upgrade
Tick each one off as you go- Breaking0.8.1
- Breaking0.7.0
- Breaking0.2.16
Release by release
- Fixed
Attributes that are reflected as properties should be
''when not present, instead ofnull. (Note thatgetAttributestill returnsnullfor them). - Fixed
textContentnow works for nodes that do not have children, like text nodes for example. - Fixed
jsdom.jQueryifywas using the wrong URL for jQuery by default.
- Fixed
- New
Add: New default level,
living, reflecting our focus on the DOM Living Standard and the HTML Living Standard, which are what browsers actually implement. This should open the door for more features of the modern DOM and HTML specs to be implemented in jsdom. - Fixed
Node.prototype.compareDocumentPositionimplemented correctly; various document position constants added to theNodeconstructor. - Fixed
DocumentType.prototype.parentNodenow returns the document node, notnull. - Fixed
Various
navigatorproperties are now getters, not data properties. - Fixed
A bug involving invalid script paths and
jsdom.jQueryify.
- New
- Fixed
The presence of
String.prototype.normalize, which is available by default in Node 0.11.13 onwards, caused reflected attributes to break. - Fixed
Iframes now correctly load
about:blankwhen thesrcattribute is empty or missing. - Fixed
Documents containing only whitespace now correctly generate wrapper documents, just like blank documents do.
- Fixed
- Fixed
The list of void elements has been updated to match the latest HTML spec.
- Fixed
When serializing void elements, don't include a
/: i.e. the result is now<br>instead of<br />.
- Fixed
- Fixed
Another case was found where jQuery 1.11's
show()method would cause errors.
- Fixed
- Fixed
Various defaults on
HTMLAnchorElementandwindow.locationshould not benull; they should usually be the empty string.
- Fixed
- Fixed
Using jQuery 1.11's
show()method would cause an error to be thrown. - Fixed
window.locationproperties were not updating correctly after usingpushStateorreplaceState.
- Fixed
- Fixed
window.location.portshould default to"", notnull.
- Fixed
54 other lines we could not sort, mostly version bumps
- 0.11.1
Add:
Node.prototype.parentElement. - 0.11.0
Add:
Node.prototype.containsnow implemented. - 0.11.0
Add:
navigator.cookieEnablednow implemented; it always returnstrue. - 0.11.0
Change: DOCTYPEs no longer have their
nameproperty uppercased during parsing, and appear in the output ofdocument.innerHTML. - 0.10.6
Add: Remaining URL properties to
window.locationandHTMLAnchorElement. - 0.10.6
Tweak: lazy-load the request module, to improve overall jsdom loading time.
- 0.10.4
Add:
querySelectorandquerySelectorAllmethods toDocumentFragments. - 0.10.0
Add: A more complete
document.cookieimplementation, that supports multiple cookies. Note that options likepath,max-age, etc. are still ignored. - 0.9.0
Add:
portandprotocoltoHTMLAnchorElement. - 0.8.11
Add: Store and use cookies between requests; customizable cookie jars also possible.
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.