jsdom v12.0.0 Release Notes

  • ๐Ÿš€ 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:

    • jsdom now requires Node.js v8.
    • โœ‚ 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.