Packages

jsdom

31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed

Your version

12.0.0

major19 Aug 2018Where it was published

12.2.0 is the newest release of 12.x.

In short

1 breaking1 removed4 new7 fixed2 changed

  • Breaking

    Jsdom now requires Node.js v8.

  • Removed

    Removed the old jsdom API, as the new API now has all the capabilities you need.

Release note

This major release brings along our new resource loader API, finally bringing all the capabilities from jsdom v9 to the new (jsdom v10+) API. Thanks very much to @sarvaje for his work to make this possible!

Breaking changes:

  • Breaking

    Jsdom now requires Node.js v8.

  • Removed

    Removed the old jsdom API, as the new API now has all the capabilities you need.

  • Updated our parse5 dependency to v5, which changes the format of the node locations returned by dom.nodeLocation().

  • Updated our whatwg-url dependency to v7, which changes the origin of file: URLs to be an opaque origin (and thus file: URLs are no longer same origin to each other).

Other changes:

  • Added countReset(), dir() and dirxml() methods to console.

  • Added the InputEvent class.

  • Added window.status.

  • Added htmlElement.draggable.

  • Fixed window.frameElement to correctly return an actual HTMLElement instance, instead of a jsdom internal class.

  • Fixed cloning of textarea elements to preserve their values.

  • Fixed select.selectedOptions sometimes returning outdated results.

  • Fixed CSS selection APIs sometimes returning outdated results, especially for state pseudo-class selectors like :checked.

  • Fixed CSS selection APIs to throw an error for invalid selectors even when used on empty nodes.

  • Fixed window.name to default to the empty string, per spec, instead of "nodejs".

  • Fixed the default User-Agent to say "unknown OS" instead of "undefined" when jsdom is used in web browsers.

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.