jsdom v10.0.0 Release Notes

  • ๐Ÿ“š This release includes a complete overhaul of jsdom's API for creating and manipulating jsdoms. The new API is meant to be much more intuitive and have better defaults, with complete documentation in the newly-overhauled README. We hope you like it!

    ๐Ÿ‘ As discussed in the new README, the old API is still available and supported via require("jsdom/lib/old-api.js"), at least until we have ported all of its features over to the new API. It will, however, not be gaining any new features, and we suggest you try the new API unless you really need the customizable resource loading the old API provides.

    Apart from the new API, the following changes were made, with breaking changes bolded:

    • โœ‚ Removed support for Node.js v4 and v5, as we have started using new JavaScript features only supported in Node.js v6 onwards.
    • ๐Ÿ”„ Changed the omitJsdomErrors option to omitJSDOMErrors, for consistency with web platform APIs.
    • โž• Added document.dir. (Zirro)
    • โšก๏ธ Updated the <a> and <area> APIs to the latest specification, and fixed a few bugs with them. (makana)
    • ๐Ÿ›  Fixed <img> elements to no longer fire load events unless their image data is actually loaded (which generally only occurs when the canvas package is installed).
    • ๐Ÿ›  Fixed XMLHttpRequest preflights to forward approved preflight headers to the actual request. (mbroadst)
    • ๐Ÿ›  Fixed htmlElement.dir to properly restrict its values to "ltr", "rtl", or "auto". (Zirro)
    • ๐Ÿ›  Fixed setting innerHTML to the empty string to no longer be a no-op. (Zirro)
    • ๐Ÿ›  Fixed the origin-checking logic in window.postMessage(), so that now you don't always have to pass an origin of "*". (jmlopez-rod)
    • ๐Ÿ‘Œ Improved the xhr.open() error message when there are not enough arguments. (lencioni)