This repository has been archived by the owner on Jan 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Update dependency jsdom to v16 [SECURITY] #32
Open
renovate
wants to merge
1
commit into
master
Choose a base branch
from
renovate/npm-jsdom-vulnerability
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
renovate
bot
force-pushed
the
renovate/npm-jsdom-vulnerability
branch
from
November 20, 2022 23:55
c6b0202
to
605ea3e
Compare
renovate
bot
changed the title
Update dependency jsdom to v20 [SECURITY]
Update dependency jsdom to v16 [SECURITY]
Nov 20, 2022
renovate
bot
force-pushed
the
renovate/npm-jsdom-vulnerability
branch
from
November 30, 2022 13:17
605ea3e
to
dcff899
Compare
renovate
bot
changed the title
Update dependency jsdom to v16 [SECURITY]
Update dependency jsdom to v20 [SECURITY]
Nov 30, 2022
renovate
bot
force-pushed
the
renovate/npm-jsdom-vulnerability
branch
from
November 30, 2022 16:25
dcff899
to
08aee05
Compare
renovate
bot
changed the title
Update dependency jsdom to v20 [SECURITY]
Update dependency jsdom to v16 [SECURITY]
Nov 30, 2022
renovate
bot
force-pushed
the
renovate/npm-jsdom-vulnerability
branch
from
December 9, 2022 09:49
08aee05
to
92f84f2
Compare
renovate
bot
changed the title
Update dependency jsdom to v16 [SECURITY]
Update dependency jsdom to v20 [SECURITY]
Dec 9, 2022
renovate
bot
force-pushed
the
renovate/npm-jsdom-vulnerability
branch
from
December 9, 2022 23:33
92f84f2
to
f1753cd
Compare
renovate
bot
changed the title
Update dependency jsdom to v20 [SECURITY]
Update dependency jsdom to v16 [SECURITY]
Dec 9, 2022
renovate
bot
force-pushed
the
renovate/npm-jsdom-vulnerability
branch
from
December 10, 2022 08:32
f1753cd
to
46c1b99
Compare
renovate
bot
changed the title
Update dependency jsdom to v16 [SECURITY]
Update dependency jsdom to v20 [SECURITY]
Dec 10, 2022
renovate
bot
force-pushed
the
renovate/npm-jsdom-vulnerability
branch
from
December 10, 2022 11:08
46c1b99
to
ae1c8bc
Compare
renovate
bot
changed the title
Update dependency jsdom to v20 [SECURITY]
Update dependency jsdom to v16 [SECURITY]
Dec 10, 2022
renovate
bot
force-pushed
the
renovate/npm-jsdom-vulnerability
branch
from
December 17, 2022 07:22
ae1c8bc
to
d30c9e3
Compare
renovate
bot
changed the title
Update dependency jsdom to v16 [SECURITY]
Update dependency jsdom to v20 [SECURITY]
Dec 17, 2022
renovate
bot
force-pushed
the
renovate/npm-jsdom-vulnerability
branch
from
December 17, 2022 10:16
d30c9e3
to
3c7c00c
Compare
renovate
bot
changed the title
Update dependency jsdom to v20 [SECURITY]
Update dependency jsdom to v16 [SECURITY]
Dec 17, 2022
renovate
bot
force-pushed
the
renovate/npm-jsdom-vulnerability
branch
from
December 20, 2022 06:07
3c7c00c
to
2eda57b
Compare
renovate
bot
changed the title
Update dependency jsdom to v16 [SECURITY]
Update dependency jsdom to v20 [SECURITY]
Dec 20, 2022
renovate
bot
force-pushed
the
renovate/npm-jsdom-vulnerability
branch
from
December 20, 2022 08:39
2eda57b
to
8299245
Compare
renovate
bot
changed the title
Update dependency jsdom to v20 [SECURITY]
Update dependency jsdom to v16 [SECURITY]
Dec 20, 2022
renovate
bot
force-pushed
the
renovate/npm-jsdom-vulnerability
branch
from
January 6, 2023 10:13
8299245
to
f3c7632
Compare
renovate
bot
changed the title
Update dependency jsdom to v16 [SECURITY]
Update dependency jsdom to v20 [SECURITY]
Jan 6, 2023
renovate
bot
force-pushed
the
renovate/npm-jsdom-vulnerability
branch
from
January 6, 2023 14:06
f3c7632
to
992fa6a
Compare
renovate
bot
changed the title
Update dependency jsdom to v20 [SECURITY]
Update dependency jsdom to v16 [SECURITY]
Jan 6, 2023
renovate
bot
force-pushed
the
renovate/npm-jsdom-vulnerability
branch
from
January 17, 2023 16:59
992fa6a
to
41700ca
Compare
renovate
bot
changed the title
Update dependency jsdom to v16 [SECURITY]
Update dependency jsdom to v21 [SECURITY]
Jan 17, 2023
renovate
bot
force-pushed
the
renovate/npm-jsdom-vulnerability
branch
from
January 18, 2023 08:57
41700ca
to
eea6c35
Compare
renovate
bot
changed the title
Update dependency jsdom to v21 [SECURITY]
Update dependency jsdom to v16 [SECURITY]
Jan 18, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
0 participants
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^4.0.5
->^16.5.0
GitHub Vulnerability Alerts
CVE-2021-20066
JSDom improperly allows the loading of local resources, which allows for local files to be manipulated by a malicious web page when script execution is enabled.
Release Notes
jsdom/jsdom
v16.5.0
Compare Source
window.queueMicrotask()
.window.event
.inputEvent.inputType
. (diegohaz)ondragexit
fromWindow
and friends, per a spec update.about:blank
iframes. Previously it was getting set to the parent's URL. (SimonMueller)hidden=""
attribute to causedisplay: none
per the user-agent stylesheet. (ph-fritsche)new File()
constructor to no longer convert/
to:
, per a pending spec update.MutationObserver
instance as theirthis
value.<input type=checkbox>
and<input type=radio>
to be mutable even when disabled, per a spec update.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.XMLHttpRequest
to expose theContent-Length
header on cross-origin responses.xhr.response
to returnnull
for failures that occur during the middle of the download.localStorage
ordataset
. (ExE-Boss)v16.4.0
Compare Source
getComputedStyle()
, unless you pass a::part
or::slotted
pseudo-element, in which case we throw an error per the spec. (ExE-Boss)el.tagName
, which also indirectly improves performance of selector matching and style computation. (eps1lon)form.elements
to respect theform=""
attribute, so that it can contain non-descendant form controls. (ccwebdesign)el.focus()
to do nothing on disconnected elements. (eps1lon)el.focus()
to work on SVG elements. (zjffun)<body>
element. (eps1lon)imgEl.complete
to return true for<img>
elements with empty or unsetsrc=""
attributes. (strager)imgEl.complete
to return true if an error occurs loading the<img>
, when canvas is enabled. (strager)imgEl.complete
to return false if the<img>
element'ssrc=""
attribute is reset. (strager)valueMissing
validation check for<input type="radio">
. (zjffun)translate=""
anddraggable=""
attribute processing to use ASCII case-insensitivity, instead of Unicode case-insensitivity. (zjffun)v16.3.0
Compare Source
focusin
andfocusout
when usingel.focus()
andel.blur()
. (trueadm)contenteditable=""
attribute to be considered as focusable. (jamieliu386)window.NodeFilter
to be per-Window
, instead of shared across allWindow
s. (ExE-Boss)handleEvent
properties as event listeners. (ExE-Boss)load
event instead of anerror
event, when thecanvas
package is installed. (strager)v16.2.2
Compare Source
StyleSheetList
for better spec compliance; notably it no longer inherits fromArray.prototype
. (ExE-Boss)requestAnimationFrame()
from preventing process exit. This likely regressed in v16.1.0.setTimeout()
to no longer leak the closures passed in to it. This likely regressed in v16.1.0. (AviVahl)click()
on a<label>
element, or one of its descendants.getComputedStyle()
to consider inlinestyle=""
attributes. (eps1lon)<input type="number">
'sstepUp()
andstepDown()
functions to be properly decimal-based, instead of floating point-based.selectEl.value
would not invalidate properties such asselectEl.selectedOptions
. (ExE-Boss)<input>
'ssrc
property, and<ins>
/<del>
'scite
property, to properly reflect as URLs.window.addEventLister
,window.removeEventListener
, andwindow.dispatchEvent
to properly be inherited fromEventTarget
, instead of being distinct functions. (ExE-Boss)addEventListener
.data:
URLs.<input type="month">
that could occur in some time zones and for some times.document.implementation.createDocument()
to return anXMLDocument
, instead of aDocument
. (ExE-Boss)v16.2.1
Compare Source
saxes
, to bring in some BOM-related fixes.npm audit
warnings.v16.2.0
Compare Source
Attr
as aNode
, e.g. by checking itsbaseURI
property or callingattr.cloneNode()
.v16.1.0
Compare Source
console.timeLog()
.Attr
to extendNode
, to align with specifications. (ExE-Boss)<noscript>
children to be parsed as nodes, instead of as text, whenrunScripts
is left as the default ofundefined
. (ACHP)cssstyle
to v2.1.0, which brings along fixes to handling ofrgba()
andhsl()
colors. (kraynel)<input>
s and<textarea>
s. (Matthew-Goldberg)setTimeout()
,setInterval()
, andrequestAnimationFrame()
, particularly around window closing and recursive calls.v16.0.1
Compare Source
runScripts
was set.<input>
'stype=""
attribute.<input type="range">
whenmax=""
is less thanmin=""
.v16.0.0
Compare Source
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:
dom.runVMScript()
API has been replaced with the more generaldom.getInternalVMContext()
API.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.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:
AbstractRange
,Range
,StaticRange
,Selection
, andwindow.getSelection()
APIs.Comment
,Text
, andDocumentFragment
.valueAsDate
,valueAsNumber
,stepUp()
andstepDown()
to<input>
elements. (kraynel)window.origin
.document.origin
.<template>
to work correctly inside XML documents.<meta charset>
or<meta http-equiv="charset">
elements.input.type
to default to"text"
. (connormeredith)<input>
with fractional values for theirstep=""
attribute. (kontomondo)<input>
elements.<input type="email" multiple pattern="...">
validation.fileReader.readAsDataURL()
to always base64-encode the result. (ytetsuro)<img>
elements into documents without a browsing context to no longer crash when thecanvas
package is installed.window.setTimeout()
orwindow.setInterval()
.getComputedStyle()
. (eps1lon)v15.2.1
Compare Source
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)focus
events. (eps1lon)mediaElement.addTextTrack()
. (mtsmfm)nwsapi
minimum version to 2.2.0, which fixes issues with::-webkit-
prefixed pseudo-elements and namespaced attribute selectors.v15.2.0
Compare Source
getComputedStyle()
for the'visibility'
property. This sets the foundation for further work on inheritance, cascading, and specificity. (eps1lon)shadowRoot.activeElement
.readystatechange
events during document loading.form.requestSubmit()
, to match our existing stub forform.submit()
.el.tabIndex
's default value, when notabindex=""
attribute was set, to reflect the updated specification.el.attachShadow()
on something that's already a shadow host, to reflect the updated specification.<input type="range">
.selectEl.value
when no<option>
is selected to return the empty string, instead of the value of the first option. (tgohn)new FormData(formElement)
. (brendo)"undefined"
. (papandreou)el.getAttributeNS()
orel.setAttributeNS()
.canvas
as an optional ``peerDependency`, which apparently helps with Yarn PnP support.v15.1.1
Compare Source
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.style
andon<event>
properties to properly track their related attributes for SVG elements. (kbruneel)XMLHttpRequest
merging preflight and response headers. (thiagohirata)XMLHttpRequest
reserializingcontent-type
request headers unnecessarily. See whatwg/mimesniff#84 for more details. (thiagohirata)element.tagName
to be the ASCII uppercase of the element's qualified name, instead of the Unicode uppercase.v15.1.0
Compare Source
Headers
class from the Fetch standard.element.translate
getter and setter.XMLHttpRequest
on the newly-released Node.js v12.form.elements
to exclude<input type="image">
elements.pattern=""
form control validation to apply the given regular expression to the whole string. (kontomondo)v15.0.0
Compare Source
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
.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.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
.v14.1.0
Compare Source
<a>
and<area>
elements whosehref=""
points to ajavascript:
URL or fragment.<datalist>
element'soptions
property.<input>
element'slist
property.PageTransitionEvent
, and the firing ofpageshow
events during loading.External
class as a property ofwindow
.innerHTML
andouterHTML
) to be spec-compliant. (pmdartus)innerHTML
) breaking after setting certain properties to non-string values.<style>
s to no longer apply to documents without a browsing context. This includes fixing a crash that would occur with such styles if they had an@import
rule.<option>
'slabel
andvalue
properties to return correct values in various edge cases.load
event during document loading to target theDocument
, not theWindow
.pretendToBeVisual
option to propagate to child subframes, as well as the mainWindow
. (pyrho)nwsapi
version from v2.1.1 to v2.1.3, bringing along a few fixes in our selector engine.v14.0.0
Compare Source
Breaking changes:
JSDOM.fragment()
now creates fragments whose document has no browsing context, i.e. no associatedWindow
. This means thedefaultView
property will be null, resources will not load, etc.JSDOM.fragment()
, called with no arguments, now creates aDocumentFragment
with no children, instead of with a single child text node whose data was"undefined"
.Other changes:
element.blur()
on a focused element.<link>
elements into documents with no browsing context to no longer crash if the originatingJSDOM
was configured to fetch the resource. Now, per spec,<link>
elements only attempt to fetch if they are browsing-context connected.<template>
elements to have the correct semantics, of using a separate browsing-context-less document to store its contents. In particular this means resources will not be fetched for elements inside the<template>
, as per spec.v13.2.0
Compare Source
MutationObserver
s! (pmdartus)<progress>
element'svalue
,max
, andposition
properties.navigator.plugins
andnavigator.mimeTypes
. (But, they are always empty.)<summary>
elements respond toclick
events by toggling their parent<details>
.<summary>
elements to be focusable.isTrusted
set totrue
.DOMParser
-created documents to have theirreadyState
set to"complete"
.<fieldset>
s get disabled.getComputedStyle()
to throw a sensible exception when passed the wrong argument, instead of one that exposes jsdom internals.saxes
dependency, so that it now correctly errors on XML fragments like<foo bar:="1"/>
.v13.1.0
Compare Source
el.insertAdjacentElement()
andel.insertAdjacentText()
.reset
event toform.reset()
. (epfremmer)type
,value
, anddefaultValue
properties to<output>
elements, including their form reset behavior. (epfremmer)outputEl.htmlFor
property.<style>
or<script>
elements. This regressed in v11.6.0. To learn more, see V8 issue #6730.style
property on<a>
and<area>
elements. This regressed in v13.0.0.node.isConnected
to not always return false for nodes inside a shadow tree. (pmdartus)<button type="reset">
and<input type="reset">
elements to actually perform a form reset when clicked, instead of doing nothing. (epfremmer)el.setCustomValidity()
for<output>
and<fieldset>
.click
events, so that for example callingel.click()
on the child of a submit button element will submit the form.focus
/blur
events to be composed.mediaElement.duration
to default toNaN
.olEl.start
to default to1
.XMLHttpRequest
against non-existantfile:
URLs to treat that as a network error, instead of crashing. (pascalbayer) Note that in the future we may completely disableXMLHttpRequest
usage againstfile:
URLs to follow the browser security model.document.title
in SVG documents.titleElement.text
to return the child text content, instead of being the same astitleElement.innerHTML
.<textarea>
s to properly account for child CDATA section nodes changing.Element.prototype[Symbol.unscopables]
.v13.0.0
Compare Source
Breaking change:
canvas
package, in favor of v2.x. This also removes support forcanvas-prebuilt
, sincecanvas
v2.x has a built-in prebuilt version.Other changes:
w3c-xmlserializer
package. Previously we were just using the HTML serialization, even in XML documents.storageEvent.initStorageEvent()
method.passive
option toaddEventListener()
.relList
property to<a>
,<area>
, and<link>
elements.v12.2.0
Compare Source
element.toggleAttribute()
method.XMLHttpRequest
sometimes sending an empty request body after a preflight request. (andreasf)formElement.form
property to use an algorithm that also checks theform=""
attribute, instead of always looking for the closest ancestor<form>
element. (jamietre)canvas
orcanvas-prebuilt
packages were installed, but failed to load. (joscha)v12.1.0
Compare Source
sax
package to the well-maintainedsaxes
replacement. This increases our specification conformance, including rejecting certain ill-formed XML documents that were previously accepted, and properly handling other constructs like empty comments, CDATA sections, and<script>
elements. (lddubeau)fieldsetEl.elements
andfieldsetEl.type
properties.options
parameter todom.runVMScript()
. (SimenB)fetch()
implementations to see what element initiated the fetch. (sarvaje)input
andchange
events for<input>
elements to be trusted and uncancelable.<script>
s with theasync
attribute to not execute before sync<script>
s that precede them. We still do not, in general, have proper execution of scripts during the initial parsing of a document, so this fix is more of a reduction of badness than an alignment with the specification. This behavior regressed in v12.0.0. (sarvaje)v12.0.0
Compare Source
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:
parse5
dependency to v5, which changes the format of the node locations returned bydom.nodeLocation()
.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:
countReset()
,dir()
anddirxml()
methods toconsole
.InputEvent
class.window.status
.htmlElement.draggable
.window.frameElement
to correctly return an actualHTMLElement
instance, instead of a jsdom internal class.textarea
elements to preserve their values.select.selectedOptions
sometimes returning outdated results.:checked
.window.name
to default to the empty string, per spec, instead of"nodejs"
.v11.12.0
Compare Source
window.localStorage
,window.sessionStorage
, andStorageEvent
support. These are currently only stored in-memory; file an issue if you need persistent (on-disk) storage capability so we can discuss adding that. This feature includes the newstorageQuota
option for controlling how much can be stored.element.closest()
. (caub)hashchange
andpopstate
events to no longer bubble, per a specification update.cssstyle
to v1.0.0, bringing along various fixes to our CSS parser and object model. (eddies)nwsapi
to v2.0.7, bringing along various fixes to our selector engine.v11.11.0
Compare Source
node.getRootNode()
. (FrecksterGIT)label.control
. (FrecksterGIT)el.labels
for form control elements. (FrecksterGIT)contentType
ofDocument
s created through<iframe>
s.contentType
andorigin
ofDocument
s created throughdocument.implementation.createDocument()
.sourceEl.srcset
to return the value of thesrcset=""
attribute, instead of thecite=""
attribute.node.normalize()
to not modify non-Text
nodes. (lddubeau)cssstyle
to v0.3.1, bringing along various fixes to our CSS parser and object model. (jsakas)whatwg-url
to v6.4.1, fixing the interaction ofURL
'shref
andsearchParams
properties.nwsmatcher
tonwsapi
, bringing along extensive fixes, performance improvements, and additional selector support.v11.10.0
Compare Source
event.srcElement
andevent.returnValue
.XMLHttpRequest
to correctly set the User-Agent header, and set it on CORS preflight requests. (BehindTheMath)v11.9.0
Compare Source
node.lookupPrefix()
,node.lookupNamespaceURI()
andnode.isDefaultNamespace()
.Document
s; previously it would not clone all of the appropriate state, and would sometimes add an extra document type node.textContent
andnodeValue
properties.canvas.toBlob()
to properly pass through the JPEG quality argument, instead of always passing zero tonode-canvas
. (challakoushik)v11.8.0
Compare Source
willValidate
,validity
,validationMessage
,checkValidity()
,reportValidity()
, andsetCustomValidity()
, onHTMLButtonElement
,HTMLFieldSetElement
,HTMLFormElement
,HTMLInputElement
,HTMLObjectElement
,HTMLOutputElement
,HTMLSelectElement
, andHTMLTextAreaElement
. (kontomondo)getElementById()
toDocumentFragment
.v11.7.0
Compare Source
DOMTokenList
'sreplace()
method, per the recent spec addition.FileReader
'sreadAsBinaryString()
method, as it has been added back to the specification.Window
, instead of onWindow.prototype
. (Fetz)<img>
element'ssrc=""
attribute. (atsikov)abort
events onAbortSignal
s to have theirisTrusted
set to true.XMLHttpRequest
'sopen()
method.data:
URL parsing throughout jsdom, by using the newwhatwg-mimetype
anddata-urls
packages..webidl
files that were included in the npm package.v11.6.2
Compare Source
<style>
elements, where they would omit a series of parsingjsdomError
events for any style sheet text containing spaces.<style>
and<script>
elements are evaluated; for example,<script>
elements inserted byinnerHTML
are no longer evaluated.v11.6.1
Compare Source
<style>
elements, where theirsheet
property would sometimes benull
when it should not be.<style>
element'ssheet
property would be left as aCSSStyleSheet
despite it not being in the document.Another regression remains where we are emitting spurious CSS-parsing
jsdomError
events; see #2123. We also discovered a large amount of preexisting brokenness around<style>
,<link>
, and@import
; see #2124 for more details.We'll try to fix these soon, especially the regression.
v11.6.0
Compare Source
WebSocket
implementation!window.performance
implementation, including the basics of the High Resolution Time specification:performance.now()
,performance.timeOrigin
, andperformance.toJSON()
.HTMLMeterElement
, except formeterEl.labels
.locationbar
,menubar
,personalbar
,scrollbars
,statusbar
, andtoolbar
properties toWindow
.window.screen
:availWidth
,availHeight
,colorDepth
, andpixelDepth
. All of its properties are now getters as well.window.devicePixelRatio
.getModifierState()
toMouseEvent
andKeyboardEvent
.HTMLInputElement
'sfiles
property.endings
option to theBlob
constructor.MouseEvent
when usingelement.click()
.popstate
andhashchange
events during fragment navigation to make them trusted events.data:
URL parsing to not include the fragment portions.new Document()
to be UTF-8.probablySupportsContext()
andsetContext()
fromHTMLCanvasElement
, per spec updates.window.scrollLeft
andwindow.scrollTop
properties, and thewindow.createPopup()
method.v11.5.1
Compare Source
(This should have been a minor release; oops.)
AbortSignal
andAbortController
.<input>
s and implemented validation for more input types.v11.4.0
Compare Source
For this release we'd like to welcome @Zirro to the core team; his contributions over the course of this year have enhanced jsdom immensely.
SVGElement
,SVGGraphicsElement
,SVGSVGElement
,SVGTests
,SVGAnimatedString
,SVGNumber
, andSVGStringList
. The main impact here is that SVG elements are now instances ofSVGElement
, instead of being simplyElement
(as they were in v11.3.0) orHTMLUnknownElement
(as they were in v11.2.0 and previously). The only concrete subclass that is implemented isSVGSVGElement
, for<svg>
itself; other tags will not map to their correct classes, because those classes are not yet implemented.pretendToBeVisual
option, which controls the presence of the newrequestAnimationFrame()
andcancelAnimationFrame()
methods, and the new values ofdocument.hidden
/document.visibilityState
. See the README for more information. (SimenB)append()
andprepend()
methods toDocument
,DocumentFragment
, andElement
. (caub)before()
,after()
, andreplaceWith()
methods toDocumentType
,Element
, andCharacterData
. (caub)node.isConnected
.node.isSameNode()
.domParser.parseFromString()
. (myabc)input.value
getter/setter logic for<input type="file">
.NamedNodeMap
, i.e. ofelement.attributes
, such that retrieving named or indexed properties will now always work properly.domParser.parseFromString()
to not parse HTML character entities in XML documents. (myabc)xhr.abort()
to clear any set headers.XMLHttpRequest
to always decoded responses as UTF-8 whenresponseType
is set to"json"
.XMLHttpRequest
CORS header handling, especially with regard to preflights and Access-Control-Allow-Headers. (ScottAlbertine)radioButton.click()
to fire appropriateinput
andchange
events. (liqwid)querySelector()
/querySelectorAll()
behavior for SVG elements inside<template>
contentsDocumentFragment
s, including those created byJSDOM.fragment()
. (caub)<script>
elements, whenincludeNodeLocations
is set.<applet>
element, following the spec.v11.3.0
Compare Source
For this release we'd like to formally welcome @TimothyGu to the core team, as a prolific contributor. He will join the illustrious ranks of those who do so much work on jsdom that we no longer note their names in the changelog.
table.tHead
,table.tFoot
, andtable.caption
setters, and thetable.createTBody()
method.CompositionEvent
andWheelEvent
classes.<details>
element implementation. (Zirro)<marquee>
and<picture>
element implementations. (Zirro)uiEvent.initUIEvent()
,keyboardEvent.initKeyboardEvent()
, andmouseEvent.initiMouseEvent()
to match the latest specifications.DOMTokenList
(used by, e.g.,element.classList
) to use proxies for improved specification compliance and "liveness".DOMException
class to be spec-compliant, including its constructor signature.table.rows
getter, and thetable.createCaption()
andtable.deleteRow()
methods.document.querySelector === documentFragment.querySelector
, incorrectly).FocusEvent
creation, which regressed in v11.2.0.UIEvent
to only allow initializing withWindow
objects for itsview
property.tr.rowIndex
andtr.deleteCall()
.<td>
and<th>
to be simplyHTMLTableCellElement
, and improved that class's spec compliance.label.click()
to not trigger the labeled control's activation behavior when the control is disabled. (schreifels)document.getElementsByName()
to return aNodeList
instead of aHTMLCollection
. (Zirro)XMLHttpRequest
. (Zirro)v11.2.0
Compare Source
This release brings with it a much-awaited infrastructure change, as part of webidl2js v7.3.0 by the ever-amazing TimothyGu: jsdom can now generate spec-compliant versions of classes that have "
Proxy
-like" behavior, i.e. allow getting or setting keys in unusual ways. This enables a number of improvements, also by TimothyGu:NodeList
andHTMLCollection
, such that retrieving properties via indices or (inHTMLCollection
's case)id
/name
values will always work correctly.element.dataset
support.<select>
elements, as well as the correspondingitem()
andnamedItem()
methods.FileList
indexed properties, i.e.fileList[i]
.select.options
an instance of the newly-implementedHTMLOptionsCollection
, instead of just aHTMLCollection
.This infrastructure will allow us to improve and implement many other similar behaviors; that work is being tracked in #1129.
In addition to these improvements to the object model, we have more work to share:
document.clear()
,document.captureEvents()
,document.releaseEvents()
,window.external.AddSearchProvider()
, andwindow.external.IsSearchProviderInstalled()
. (Zirro)TreeWalker
andNodeIterator
.<textarea>
'svalue
,defaultValue
, andtextContent
per a recent spec changeid="undefined"
shadowing theundefined
property of the global object. (TimothyGu)getElementsByClassName()
to be ASCII case-insensitive, instead of using JavaScript'stoLowerCase()
.XMLHttpRequest
andFileReader
behavior, mainly around event handlers,abort()
, and network errors.NodeIterator
.v11.1.0
Compare Source
javascript:
URL "navigation" viawindow.location
, at least by evaluating the side effects. It still doesn't actually navigate anywhere. (ForbesLindesay)whatwg-url
to v6.1.0, bringing along origin serialization changes andURLSearchParams
among various other fixes. (ForbesLindesay)javascript:
URL loading for iframes to do proper percent-decoding and error reporting.XMLHttpRequest
responses when they were over 1 MiB.close()
d, which could cause strange errors since most objects are unusable at that point. (Enverbalalic)v11.0.0
Compare Source
Breaking changes:
parser
option to the old API, can no longer be specified. They were never tested, often broken, and a maintenance burden. The defaults, of parse5 for HTML and sax for XML, now always apply.dom.nodeLocation()
or the old API'sjsdom.nodeLocation()
now have a different structure.runScripts
applies to event handler attributes; now they will no longer be converted into event handler functions unlessrunScripts: "dangerously"
is set. However, event handler properties will now work with anyrunScripts
option value, instead of being blocked.Other changes:
oneventname
properties to various prototypes, ensures the correct order when interleaving event handlers and other event listeners, and ensures that event handlers are evaluated with the correct values in scope.Location
properties to be on the instance, instead of the prototype, and to be non-configurable.HTMLCollection
, and thus of parsing large documents. (Zirro)getComputedStyle()
by removing unsupported selectors from the default style sheet. (flaviut)TypeError
when given invalid values. (TimothyGu)Symbol.toStringTag
properties to be non-writable and non-enumerable. (TimothyGu)tokenList.remove()
when theDOMTokenList
corresponded to a non-existant attribute. (Zirro)fileReader.abort()
to terminate ongoing reads properly.xhr.send()
to support array buffer views, not justArrayBuffer
s. (ondras)GET
requests todata:
URLs usingXMLHttpRequest
. (Zirro)runScripts
.tokenList.replace()
edge-case behavior."InvalidCharacterError"
DOMException
s, instead of"NamespaceError"
DOMException
s.input.select()
to no longer throw on types where selection does not apply.event.initEvent()
and various related methods to have additional defaults.XMLHttpRequest
responses.xhr.getAllResponseHeaders()
, and separating the header values with a comma-space (not just a comma).XMLHttpRequest
.XMLHttpRequest
.xhr.overrideMimeType()
to no longer throw for invalid input.blob.close()
andblob.isClosed()
.toString()
methods on various prototypes, which were made redundant in v10.1.0 but we forgot to remove.v10.1.0
Compare Source
Symbol.toStringTag
to all web platform classes, so that nowObject.prototype.toString.call()
works as expected on jsdom objects.select.selectedOptions
property.toString()
methods on various prototypes that returned"[object ClassName]"
in an attempt to fake theSymbol.toStringTag
behavior.XMLHttpRequest
to pre-allocate a 1 MiB buffer, which it grows exponentially as needed, in order to avoid frequent buffer allocation and concatenation. (skygon)runScripts
andresources
options into iframes.xhr.abort()
during areadystatechange
event.v10.0.0
Compare Source
This release includes a complete overhaul of jsdom's API for creating and manipulating jsdoms. The new API is meant to be much more intuitive and have better defaults, with complete documentation in the newly-overhauled README. We hope you like it!
As discussed in the new README, the old API is still available and supported via
require("jsdom/lib/old-api.js")
, at least until we have ported all of its features over to the new API. It will, however, not be gaining any new features, and we suggest you try the new API unless you really need the customizable resource loading the old API provides.Apart from the new API, the following changes were made, with breaking changes bolded:
omitJsdomErrors
option toomitJSDOMErrors
, for consistency with web platform APIs.document.dir
. (Zirro)<a>
and<area>
APIs to the latest specification, and fixed a few bugs with them. (makana)<img>
elements to no longer fireload
events unless their image data is actually loaded (which generally only occurs when thecanvas
package is installed).XMLHttpRequest
preflights to forward approved preflight headers to the actual request. (mbroadst)htmlElement.dir
to properly restrict its values to"ltr"
,"rtl"
, or"auto"
. (Zirro)innerHTML
to the empty string to no longer be a no-op. (Zirro)window.postMessage()
, so that now you don't always have to pass an origin of"*"
. (jmlopez-rod)xhr.open()
error message when there are not enough arguments. (lencioni)v9.12.0
Compare Source
Option
named constructor. (NAlexPear)canvas-prebuilt
npm package as an alternative tocanvas
. (asturur)setTimeout()
andsetInterval()
to always return a positive integer, instead of returning0
the first time were called. (yefremov)jsdom.env()
to preserve URL fragments across redirects. (josephfrazier)optionEl.text
andoptionEl.value
to be more spec-compliant.event.stopImmediatePropagation()
to actually stop immediate propagation, not just propagation.clearTimeout()
andclearInterval()
to work correctly when using jsdom browserified.v9.11.0
Compare Source
offsetTop
,offsetLeft
,offsetWidth
, andoffsetHeight
that always return0
, andoffsetParent
which always returnsnull
, for all HTML elements. (yefremov)v9.10.0
Compare Source
forEach
,keys
,values
, andentries
methods toNodeList
.event.cancelBubble
.scrollWidth
,scrollHeight
,clientTop
,clientLeft
,clientWidth
, andclientHeight
that always return0
to all elements. (alistairjcbrown)Blob
,File
, andFileReader
to better match the File API specification. (TimothyGu)XMLHttpRequest
to match recent specification changes and test updates.element.getClientRects()
to return an empty array, instead of an array containing a dummy bounding box. (alistairjcbrown)navigator.vendor
to return"Apple Computer, Inc."
instead of"Google Inc."
, since we have chosen the WebKit navigator compatibility mode.v9.9.1
Compare Source
array.includes
to fix a compatibility issue with Node.js v4.v9.9.0
Compare Source
CDATASection
nodes, includingdocument.createCDATASection
. (snuggs)node.wholeText
. (jdanyow)document.body
.document.embeds
,document.plugsin
, anddocument.scripts
. These were supposed to be added in 9.5.0 but were mistakenly omitted.element.insertAdjacentHTML
to work when the element has null or the document as its parent node, as long as the insertion position is"afterbegin"
or"beforeend"
.{ once: true }
option toaddEventListener
. (i8-pi)XHTMLHttpRequest
and POSTing JSON contents to an endpoint that requires CORS while using anAuthorization
header. (dunnock)document.body
anddocument.title
to act more correctly in various edge cases.HTMLCollection
named access to return the first element encountered, not the last.v9.8.3
Compare Source
v9.8.2
Compare Source
DOMTokenList
andgetElementsByClassName
to only split on ASCII whitespace, not all Unicode whitespace.v9.8.1
Compare Source
getElementsByClassName
, e.g.getElementsByClassName("")
orgetElementsByClassName(" ")
.v9.8.0
Compare Source
blob.isClosed
property. (TimothyGu)file.lastModified
property to be onFile
instead of onBlob
. (TimothyGu)file.lastModified
property to default to the time of theFile
object's creation, not the time that the property is accessed. (TimothyGu)"iframe"
became focusable in v9.7.0.v9.7.1
Compare Source
v9.7.0
Compare Source
EventListenerOptions
support toaddEventListener
andremoveEventListener
, including both theonce
andcapture
options. (GianlucaGuarini)document.hasFocus()
(acusti)iframe
will also focus theiframe
itself. (acusti)v9.6.0
Compare Source
HTMLCollection.prototype[Symbol.iterator]
, so you can usefor
-of
loops overHTMLCollection
s now. (i8-pi)file.lastModified
to return the current time as the default, instead of0
.Attr
s to properly clone the namespace prefix.XMLHttpRequest
progress event ordering slightly to better match the spec and browsers.event.stopPropagation
andevent.stopImmediatePropagation
on already-dispatched events, per [the latestConfiguration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.