Releases: jsdom/jsdom
Releases · jsdom/jsdom
Version 17.0.0
Breaking change: Node v12 is now the minimum supported version.
Version 16.7.0
- Added
AbortSignal.abort()
. (ninevra) - Added dummy
x
andy
properties to the return value ofgetBoundingClientRect()
. (eiko) - Implemented wrapping for
textareaEl.value
if thewrap=""
attribute is specified. (ninevra) - Changed newline normalization in
<textarea>
s according to recent HTML Standard updates. (ninevra) - Fixed some bad cascade computation in
getComputedStyle()
. (romain-trotard)
Version 16.6.0
- Added
parentNode.replaceChildren()
. (@ninevra) - Fixed jsdom's handling of when code running inside the jsdom throws
null
orundefined
as an exception. (@mbest) - Removed the dependency on the deprecated
request
package, in the process fixing several issues with theXMLHttpRequest
implementation around header processing. Thanks go to @tobyhinloopen, @andrewaylett, and especially @vegardbb, for completing this months-long effort!
Version 16.5.3
- Fixed infinite recursion when using
MutationObserver
s to observe elements inside aMutationObserver
callback.
Version 16.5.2
- Fixed
Access-Control-Allow-Headers: *
to work withXMLHttpRequest
. (silviot) - Fixed
xhr.response
to strip any leading BOM whenxhr.responseType
is"json"
. - Fixed
new Text()
andnew Comment()
constructors to properly set the resulting node'sownerDocument
. - Fixed
customElements.whenDefined()
to resolve its returned promise with the custom element constructor, per recent spec updates. (ExE-Boss) - Fixed parsing to ensure that
<svg><template></template></svg>
does not throw an exception, but instead correctly produces a SVG-namespace<template>
element. - Fixed
domParser.parseFromString()
to treat<noscript>
elements appropriately. - Fixed form control validity checking when the control was outside the
<form>
element and instead associated using theform=""
attribute. - Fixed
legendEl.form
to return the correct result based on its parent<fieldset>
. - Fixed
optionEl.text
to exclude<script>
descendants. - Fixed radio buttons and checkboxes to not fire
input
andchange
events when disconnected. - Fixed
inputEl.indeterminate
to reset to its previous value when canceling aclick
event on a checkbox or radio button. - Fixed the behavior of event handler attributes (e.g.
onclick="...code..."
) when there were global variables namedelement
orformOwner
. (ExE-Boss) - On Node.js v14.6.0+ where
WeakRef
s are available, fixedNodeIterator
to no longer stop working when more than tenNodeIterator
instances are created, and to use less memory due to inactiveNodeIterator
s sticking around. (ExE-Boss)
Version 16.5.1
- Fixed a regression that broke
customElements.get()
in v16.5.0. (fdesforges) - Fixed
window.event
to have a setter which overwrites thewindow.event
property with the given value, per the specification. This fixes an issue where after upgrading to jsdom v16.5.0 you would no longer be able to set a global variable namedevent
in the jsdom context.
Version 16.5.0
- Added
window.queueMicrotask()
. - Added
window.event
. - Added
inputEvent.inputType
. (diegohaz) - Removed
ondragexit
fromWindow
and friends, per a spec update. - Fixed the URL of
about:blank
iframes. Previously it was getting set to the parent's URL. (SimonMueller) - Fixed the loading of subresources from the filesystem when they had non-ASCII filenames.
- Fixed the
hidden=""
attribute to causedisplay: none
per the user-agent stylesheet. (ph-fritsche) - Fixed the
new File()
constructor to no longer convert/
to:
, per a pending spec update. - Fixed mutation observer callbacks to be called with the
MutationObserver
instance as theirthis
value. - Fixed
<input type=checkbox>
and<input type=radio>
to be mutable even when disabled, per a spec update. - Fixed
XMLHttpRequest
to not fire a redundant finalprogress
event if aprogress
event was previously fired with the sameloaded
value. This would usually occur with small files. - Fixed
XMLHttpRequest
to expose theContent-Length
header on cross-origin responses. - Fixed
xhr.response
to returnnull
for failures that occur during the middle of the download. - Fixed edge cases around passing callback functions or event handlers. (ExE-Boss)
- Fixed edge cases around the properties of proxy-like objects such as
localStorage
ordataset
. (ExE-Boss) - Fixed a potential memory leak with custom elements (although we could not figure out how to trigger it). (soncodi)
Version 16.4.0
- Added a not-implemented warning if you try to use the second pseudo-element argument to
getComputedStyle()
, unless you pass a::part
or::slotted
pseudo-element, in which case we throw an error per the spec. (ExE-Boss) - Improved the performance of repeated access to
el.tagName
, which also indirectly improves performance of selector matching and style computation. (eps1lon) - Fixed
form.elements
to respect theform=""
attribute, so that it can contain non-descendant form controls. (ccwebdesign) - Fixed
el.focus()
to do nothing on disconnected elements. (eps1lon) - Fixed
el.focus()
to work on SVG elements. (zjffun) - Fixed removing the currently-focused element to move focus to the
<body>
element. (eps1lon) - Fixed
imgEl.complete
to return true for<img>
elements with empty or unsetsrc=""
attributes. (strager) - Fixed
imgEl.complete
to return true if an error occurs loading the<img>
, when canvas is enabled. (strager) - Fixed
imgEl.complete
to return false if the<img>
element'ssrc=""
attribute is reset. (strager) - Fixed the
valueMissing
validation check for<input type="radio">
. (zjffun) - Fixed
translate=""
anddraggable=""
attribute processing to use ASCII case-insensitivity, instead of Unicode case-insensitivity. (zjffun)
Version 16.3.0
- Added firing of
focusin
andfocusout
when usingel.focus()
andel.blur()
. (trueadm) - Fixed elements with the
contenteditable=""
attribute to be considered as focusable. (jamieliu386) - Fixed
window.NodeFilter
to be per-Window
, instead of shared across allWindow
s. (ExE-Boss) - Fixed edge-case behavior involving use of objects with
handleEvent
properties as event listeners. (ExE-Boss) - Fixed a second failing image load sometimes firing a
load
event instead of anerror
event, when thecanvas
package is installed. (strager) - Fixed drawing an empty canvas into another canvas. (zjffun)
Version 16.2.2
- Updated
StyleSheetList
for better spec compliance; notably it no longer inherits fromArray.prototype
. (ExE-Boss) - Fixed
requestAnimationFrame()
from preventing process exit. This likely regressed in v16.1.0. - Fixed
setTimeout()
to no longer leak the closures passed in to it. This likely regressed in v16.1.0. (AviVahl) - Fixed infinite recursion that could occur when calling
click()
on a<label>
element, or one of its descendants. - Fixed
getComputedStyle()
to consider inlinestyle=""
attributes. (eps1lon) - Fixed several issues with
<input type="number">
'sstepUp()
andstepDown()
functions to be properly decimal-based, instead of floating point-based. - Fixed various issues where updating
selectEl.value
would not invalidate properties such asselectEl.selectedOptions
. (ExE-Boss) - Fixed
<input>
'ssrc
property, and<ins>
/<del>
'scite
property, to properly reflect as URLs. - Fixed
window.addEventLister
,window.removeEventListener
, andwindow.dispatchEvent
to properly be inherited fromEventTarget
, instead of being distinct functions. (ExE-Boss) - Fixed errors that would occur if attempting to use a DOM object, such as a custom element, as an argument to
addEventListener
. - Fixed errors that would occur when closing a window with outstanding requests to
data:
URLs. - Fixed sporadic issues with the value of
<input type="month">
that could occur in some time zones and for some times. - Fixed
document.implementation.createDocument()
to return anXMLDocument
, instead of aDocument
. (ExE-Boss) - Fixed running jsdom in a browser to detect globals more reliably. (ExE-Boss)