Releases: jsdom/jsdom
Releases · jsdom/jsdom
Version 21.0.0
A potentially-breaking bug fix:
- Fixed the
window
,document
,location
, andtop
properties ofWindow
to be non-configurable. (ExE-Boss)
Other changes:
- Added support for
<input type=image>
submitting forms. (jenseng) - Added the
location
setter to theWindow
object, which forwards to thelocation.href
setter. Setting the URL is still only implemented for fragment navigations, however. (ExE-Boss) - Fixed
defer=""
<script>
elements that are added afterDOMContentLoaded
to execute, instead of being skipped. - Fixed
selectElement.selectedOptions
being incorrect whenoptionElement.selected
is set. This was a regression introduced in v20.0.1. Unfortunately this also reverts the performance improvement when appending<option>
elements that was introduced then. (eps1lon) - Fixed the
self
,locationbar
,menubar
,personalbar
,scrollbars
,statusbar
,toolbar
,frames
,parent
,external
,length
, andscreen
properties ofWindow
to be replaceable: that is, setting them will override their values, instead of having the new value be ignored. (ExE-Boss) - Fixed a few issues with
JSDOM.fromURL()
in the browser build of jsdom. (LungZeno)
Version 20.0.3
- Updated dependencies, notably
w3c-xmlserializer
, which fixes usingDOMParser
on XML documents containing emoji.
Version 20.0.2
- Fixed
xhr.abort()
to no longer give an exception when the constructedXMLHttpRequest
was invalid. (whamtet) - Fixed
event.getModifierState()
onMouseEvent
andKeyboardEvent
instances to properly consult thectrlKey
,altKey
,metaKey
, andshiftKey
properties of the event. (juzerzarif) - Fixed custom element creation to not be affected by any modifications to the
window.customElements
property. (bicknellr)
Version 20.0.1
- Improved the performance of appending
<option>
elements to<select>
elements. (TheHound) - Fixed
location.pathname
getter to not crash when theJSDOM
instance was created using an opaque-path URL, including the default URL ofabout:blank
. - Fixed
crypto.getRandomValues()
to accept typed array subclasses. (sebamarynissen) - Updated various dependency minor versions. Notably,
nwsapi
fixed some selectors bugs, andtough-cookie
fixed some cookie bugs.
Version 20.0.0
- Node.js v14 is now the minimum supported version.
- Added
crypto.getRandomValues()
. (sjrd) - Added
HTMLFormControlsCollection
andRadioNodeList
, soformEl.elements
now behaves correctly. (UndefinedBehavior) - Added the
signal
option toaddEventListener()
. (cheap-glitch) - Fixed the
:root
pseudoclass to work correctly. (hughs-ch) - Updated
parse5
, bringing along some HTML parsing and serialization fixes. (fb55)
Version 19.0.0
- Changed
jsdom.nodeLocation()
to returnundefined
when used on nodes that originate via fragment parsing (e.g., viainnerHTML
). Previously it would return based on the node location of the fragment string, which made node locations unreliable with respect to the original document source. This restores the behavior that was present in v14.0.0, and was accidentally broken in v14.1.0. (bakkot) - Fixed calling
window.close()
inside theWindow
'sload
event to no longer crash. (MattiasBuelens)
Version 18.1.1
- Fixed
connectedCallback
to fire in situations involving document fragments, which was broken in v18.0.1. (GrantGryczan)
Version 18.1.0
- Fixed
headers.append()
andheaders.set()
to normalize values. (MattiasBuelens) - Fixed
pageshow
events to havebubbles: true
andcancelable: true
. (MattiasBuelens) - Implemented the
reason
property onAbortSignal
s, along with the correspondingreason
argument toabortSignal.abort()
andAbortSignal.abort()
. (MattiasBuelens)
Version 18.0.1
- Fixed live
Range
s to update correctly after callingnode.normalize()
. (hgiesel) - Fixed live
Range
s to update correctly after removing child nodes. (hgiesel) - Fixed setting
inputEl.valueAsDate = null
to no longer throw an exception, but instead set the value to the empty string. (simon-weimann) - Improved performance of node insertion and
node.contains()
. (GrantGryczan)
Version 18.0.0
Potentially-breaking bug fixes:
- Fixed SSL certificate checking for WebSocket connections. Previously, invalid SSL certificates were always accepted; now, they properly respect the
ResourceLoader
'sstrictSSL
option (which defaults totrue
). - Changed the global in which almost all
Promise
andTypeError
instances are created to be the jsdom global, not the Node.js global. This could affect any code that usesinstanceof
.
Other changes:
- Fixed moving an element between HTML and XML documents to reset the
tagName
cache, allowing it to return a lowercase value once it's in the XML document. (LucasLefevre) - Fixed form submission to not happen when the form is invalid. (pozil)