Version 16.0.0
For this release we'd like to welcome @pmdartus to the core team. Among other work, he's driven the heroic effort of constructor prototype and reform in jsdom and its dependencies over the last few months, to allow us to move away from shared constructors and prototypes, and set the groundwork for custom elements support (coming soon!).
Breaking changes:
- Node v10 is now the minimum supported version.
- The
dom.runVMScript()
API has been replaced with the more generaldom.getInternalVMContext()
API. - Each jsdom
Window
now creates new instances of all the web platform globals. That is, our old shared constructor and prototypes caveat is no longer in play. - Each jsdom
Window
now exposes all JavaScript-spec-defined globals uniformly. WhenrunScripts
is disabled, it exposes them as aliases of the ones from the outer Node.js environment. Whereas whenrunScripts
is enabled, it exposes fresh copies of each global from the new scripting environment. (Previously, a few typed array classes would always be aliased, and withrunScripts
disabled, the other classes would not be exposed at all.)
Other changes:
- Added the
AbstractRange
,Range
,StaticRange
,Selection
, andwindow.getSelection()
APIs. - Added working constructors for
Comment
,Text
, andDocumentFragment
. - Added
valueAsDate
,valueAsNumber
,stepUp()
andstepDown()
to<input>
elements. (kraynel) - Added
window.origin
. - Removed
document.origin
. - Fixed
<template>
to work correctly inside XML documents. - Fixed some bugs which would cause jsdom to choose the wrong character encoding because it was failing to detect
<meta charset>
or<meta http-equiv="charset">
elements. - Fixed
input.type
to default to"text"
. (connormeredith) - Fixed incorrect validation errors for
<input>
with fractional values for theirstep=""
attribute. (kontomondo) - Fixed incorrect validation errors on readonly
<input>
elements. - Fixed
<input type="email" multiple pattern="...">
validation. - Fixed
fileReader.readAsDataURL()
to always base64-encode the result. (ytetsuro) - Fixed inserting
<img>
elements into documents without a browsing context to no longer crash when thecanvas
package is installed. - Fixed a memory leak when using
window.setTimeout()
orwindow.setInterval()
. - Improved the performance of
getComputedStyle()
. (eps1lon)