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 bydom.nodeLocation()
. - โก๏ธ Updated our
whatwg-url
dependency to v7, which changes the origin offile:
URLs to be an opaque origin (and thusfile:
URLs are no longer same origin to each other).
Other changes:
- โ Added
countReset()
,dir()
anddirxml()
methods toconsole
. - โ Added the
InputEvent
class. - โ Added
window.status
. - โ Added
htmlElement.draggable
. - ๐ Fixed
window.frameElement
to correctly return an actualHTMLElement
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.