Releases: jsdom/jsdom
Releases · jsdom/jsdom
Version 16.2.1
- Updated saxes, to bring in some BOM-related fixes
- Updated Acorn-related packages to squelch
npm audit
warnings
Version 16.2.0
- Added support for custom elements! Congratulations and thanks to @pmdartus for making this happen, after ten months of hard work and lots of effort poured into the complex architectural prerequisites in jsdom and supporting packages.
- Fixed some issues when trying to use
Attr
as aNode
, e.g. by checking itsbaseURI
property or callingattr.cloneNode()
. - Fixed a memory leak during parsing that was introduced in v14.0.0.
- Fixed edge cases in number/string conversion used for certain element properties that reflected integer attributes.
Version 16.1.0
- Added
console.timeLog()
. - Changed
Attr
to extendNode
, to align with specifications. (ExE-Boss) - Changed
<noscript>
children to be parsed as nodes, instead of as text, whenrunScripts
is left as the default ofundefined
. (ACHP) - Upgraded
cssstyle
to v2.1.0, which brings along fixes to handling ofrgba()
andhsl()
colors. (kraynel) - Fixed some selection-related issues when manipulating the value of
<input>
s and<textarea>
s. (Matthew-Goldberg) - Fixed various issues with
setTimeout()
,setInterval()
, andrequestAnimationFrame()
, particularly around window closing and recursive calls.
Version 16.0.1
- Fixed Node v10 and v11 support when
runScripts
was set. - Fixed the behavior when changing an
<input>
'stype=""
attribute. - Fixed input validation behavior for
<input type="range">
whenmax=""
is less thanmin=""
.
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)
Version 15.2.1
- Fixed
JSDOM.fromURL()
handling of URLs with hashes in them, to no longer send the hash to the server and append an extra copy of it when constructing theDocument
. (rchl) - Fixed focusing an already-focused element to correctly do nothing, instead of firing additional
focus
events. (eps1lon) - Fixed typo in the not-implemented message for
mediaElement.addTextTrack()
. (mtsmfm) - Upgraded
nwsapi
minimum version to 2.2.0, which fixes issues with::-webkit-
prefixed pseudo-elements and namespaced attribute selectors.
Version 15.2.0
- Added basic style inheritance in
getComputedStyle()
for the'visibility'
property. This sets the foundation for further work on inheritance, cascading, and specificity. (eps1lon) - Added
shadowRoot.activeElement
. - Added
readystatechange
events during document loading. - Added a stub for
form.requestSubmit()
, to match our existing stub forform.submit()
. - Changed
el.tabIndex
's default value, when notabindex=""
attribute was set, to reflect the updated specification. - Changed the exception thrown by
el.attachShadow()
on something that's already a shadow host, to reflect the updated specification. - Fixed the validation logic for
<input type="range">
. - Fixed
selectEl.value
when no<option>
is selected to return the empty string, instead of the value of the first option. (tgohn) - Fixed various correctness issues with
new FormData(formElement)
. (brendo) - Fixed error messages when parsing XML to include the filename, instead of using
"undefined"
. (papandreou) - Fixed the logic for reflected properties to not be affected by overwriting of
el.getAttributeNS()
orel.setAttributeNS()
. - Set
canvas
as an optionalpeerDependency
, which apparently helps with Yarn PnP support.
Version 15.1.1
- Moved the
nonce
property fromHTMLScriptElement
andHTMLStyleElement
toHTMLElement
. Note that it is still just a simple reflection of the attribute, and has not been updated for the rest of the changes in whatwg/html#2373. - Fixed the
style
andon<event>
properties to properly track their related attributes for SVG elements. (kbruneel) - Fixed
XMLHttpRequest
merging preflight and response headers. (thiagohirata) - Fixed
XMLHttpRequest
reserializingcontent-type
request headers unnecessarily. See whatwg/mimesniff#84 for more details. (thiagohirata) - Fixed
element.tagName
to be the ASCII uppercase of the element's qualified name, instead of the Unicode uppercase.
Version 15.1.0
- Added the
Headers
class from the Fetch standard. - Added the
element.translate
getter and setter. - Fixed synchronous
XMLHttpRequest
on the newly-released Node.js v12. - Fixed
form.elements
to exclude<input type="image">
elements. - Fixed event path iteration in shadow DOM cases, following spec fixes at whatwg/dom#686 and whatwg/dom#750.
- Fixed
pattern=""
form control validation to apply the given regular expression to the whole string. (kontomondo)
Version 15.0.0
Several potentially-breaking changes, each of them fairly unlikely to actually break anything:
JSDOM.fromFile()
now treats.xht
files asapplication/xhtml+xml
, the same as it does for.xhtml
and.xml
. Previously, it would treat them astext/html
.- If the
JSDOM
constructor'scontentType
option has acharset
parameter, and the first argument to the constructor is a binary data type (e.g.Buffer
orArrayBuffer
), then thecharset
will override any sniffed encoding in the same way as aContent-Type
header would in browser scenarios. Previously, thecharset
parameter was ignored. - When using the
Blob
orFile
constructor with theendings: "native"
option, jsdom will now convert line endings to\n
on all operating systems, for consistency. Previously, on Windows, it would convert line endings to\r\n
.