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 toomitJSDOMErrors
, 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 fireload
events unless their image data is actually loaded (which generally only occurs when thecanvas
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)