Changelog History
Page 8
-
v9.4.1 Changes
- 👯 Implemented the cloning steps for
<input>
elements, so that cloned inputs properly copy over their value, checkedness, dirty value flag, and dirty checkedness flag. (matthewp)
- 👯 Implemented the cloning steps for
-
v9.4.0 Changes
- ➕ Added the
DOMParser
API. It is spec-compliant, including producing<parsererror>
elements, except that the produced documents do not have the same URL as the creating document (they instead always have"about:blank"
). - ➕ Added strict XML parsing when using
parsingMode: "xml"
. Creating documents will now fail, just like in a browser, when ill-formed XHTML markup is used. - ➕ Added some rudimentary application of XML
<!ENTITY
declarations. - ➕ Added
window.frameElement
, although without appropriate cross-origin security checks. - ➕ Added the
jsdom.evalVMScript
public API. - ➕ Added more custom request agent support: you can now pass
agent
andagentClass
in addition toagentOptions
. (frarees) - ⚡️ Updated our elements-being-disabled semantics to more closely match the spec, in particular with regard to being descendants of
<fieldset disabled>
. - ⚡️ Updated
FormData
for recent spec fixes: blobs, files, and filenames should now all work like you'd expect. - ⚡️ Updated the
FormData
constructor to use the proper, rather-complex, constructing the form data set algorithm. - 🛠 Fixed all constructors that appears as globals on the jsdom
window
object to be non-enumerable. - 🛠 Fixed
<script>
elements to load when they gain asrc
attribute while in a document. - 🛠 Fixed
<link rel="stylesheet">
elements to load when theirhref
attributes change while in a document. - 🛠 Fixed the loading of external
<img>
s (when thecanvas
npm package is installed) that were specified via relative URL; this regressed in 9.2.1. - 🛠 Fixed
<iframe>
documents to have the correctreferrer
value (viz. the URL of their parent). - 🛠 Fixed the value of
input.checked
insideclick
events on checkboxes. - 🛠 Fixed the window object's named properties to correctly return the
<iframe>
element or the<iframe>
's window in appropriate scenarios involvingname
vs.id
attributes on the<iframe>
. (matthewp)
- ➕ Added the
-
v9.3.0 Changes
- ➕ Added the
Audio
named constructor. - 🛠 Fixed the
Image
named constructor to follow the spec more closely (e.g.Image.prototype
is now equal toHTMLImageElement.prototype
). - 🛠 Fixed the
tabIndex
setter, which regressed in 9.1.0, to no longer cause errors. - Made submit buttons and labels respond to click event cancelation correctly, preventing form submission and re-dispatching to the relevant form control. (marcandre)
- 🛠 Fixed unhandled errors thrown in XHR event handlers being swallowed; they now properly are redirected to the virtual console.
- ➕ Added the
-
v9.2.1 Changes
- 🛠 Fixed
<input>
'sselectionStart
,selectionEnd
, andselectionDirection
getters to return null, instead of throwing, for elements that do not allow selection, per a recent spec change. - 🛠 Fixed
<base>
'shref
getter logic to return the attribute value instead of the empty string for unparseable URLs, per a recent spec change. - 🛠 Fixed the referrer sent when retrieving external resources to be the document's URL, not the document's base URL.
- 🛠 Fixed suppression of all
error
events onwindow
beyond the first one. - 🛠 Fixed
new URL
to correctly throw for unparseable URLs, and all ofURL
's setters to correctly ignore invalid input instead of throwing. - 🛠 Fixed
StyleSheetList.prototype.item
to returnnull
instead ofundefined
for out-of-bounds indices. (Ginden) - 💅 Updated
cssstyle
minimum version to ensure all jsdom installs (not just fresh ones) get the benefit ofcssstyle
's recently-betterbackground
andwidth
setters.
- 🛠 Fixed
-
v9.2.0 Changes
- ➕ Added
jsdom.changeURL(window, newURL)
for allowing you to override a window's existing URL. (mummybot) - 🛠 Fixed the
proxy
option to be applied to all requests; previously it was not always passed through. (nicolashenry) - 🛠 Fixed
XMLHttpRequest
response header filtering for cross-origin requests; this also fixesProgressEvent
s fired from such XHRs. (nicolashenry)
- ➕ Added
-
v9.1.0 Changes
- ➕ Added a somewhat-reasonable implementation of focus and focus events. Although the full complexity of focus is not implemented, the following improvements have been made:
- Only elements which are focusable can be focused.
- Added the
FocusEvent
class, and nowfocus
andblur
events are fired appropriately. tabIndex
now returns0
by default for focusable elements.
- Reimplemented
navigator
to be to-spec:- Added
appCodeName
,product
,productSub
,vendor
, andvendorSub
; also changesuserAgent
,appName
,platform
, andversion
to be more browser-like instead of based on various Node.js information. - Added
language
andlanguages
. - Added
onLine
. - Added
javaEnabled()
. - Removed
noUI
.
- Added
- 🛠 Fixed
formEl.action
to return a value resolved relative to the document URL, or to return the document URL if the corresponding attribute is missing or empty. - Sped up XPath execution. (vsemozhetbyt)
- 🛠 Fixed
window.close()
not correctly clearing event listeners on the document. (Ojek) - 🛠 Fixed a regression introduced in v9.0.0 where invalid CSS would cause a crash while attempting to parse it. Instead, a
"jsdomError"
will now be emitted to the virtual console.
- ➕ Added a somewhat-reasonable implementation of focus and focus events. Although the full complexity of focus is not implemented, the following improvements have been made:
-
v9.0.0 Changes
🚀 This major release removes jsdom's support for mutation events. Mutation events were never well-specified, and the modern DOM Standard omits them in the hopes that they can be removed from browsers (although this has not yet happened in major browser engines). We had hoped to implement their modern alternative, mutation observers, before performing this removal, to give jsdom users the same capabilities.
🚀 However, recent performance investigations revealed that mutation events were the major bottleneck in most jsdom operations; tools like ecmarkup which make heavy use of jsdom had their running time halved by removing mutation events, which add serious overhead to every DOM mutation. As such, we are doing a major release with them removed, so that jsdom users can benefit from this massive performance gain.
👍 Mutation observer support is in progress; please use the GitHub reactions feature to vote on that issue if you are impacted by this removal and are hoping for mutation observer support to replace it.
🌲 Your normal change log follows:
- ✂ Removed mutation events, as discussed above.
- ➕ Added the
DOMTokenList.prototype.replace
method. (nicolashenry) - ⚡️ Updated
DOMTokenList.prototype.contains
to no longer validate its arguments, as per the latest spec. (nicolashenry) - Made various improvements to XMLHttpRequest (nicolashenry):
- Added the
responseURL
property. - Updated methods, headers, and header values to use the
ByteString
algorithm. - Fixed the default
statusText
to be""
instead of"OK"
.
- Added the
- 🛠 Fixed the
Blob
constructor'stype
validation. (nicolashenry)
-
v8.5.0 Changes
- ➕ Added encoding handling (nicolashenry)
jsdom.env
, when given a URL or file, will decode the resulting bytes using signals like theContent-Type
header,<meta charset>
declaration, or presence of a BOM, in the same manner as web browsers.- Fetching external resources, via mechanisms such as XMLHttpRequest or
<script>
/<link>
/<iframe>
tags, will also account for such signals. jsdom.jsdom()
, which takes a string, still sets a "UTF-8" encoding by default, since there are no bytes or headers for it to sniff an encoding from.
- ✂ Removed
iframe.sandbox
property, since it was not implemented and simply crashed when used. - ✂ Removed
element.sourceIndex
property, since it was nonstandard (Internet Explorer only). - 🛠 Fixed setting proxied inline event handlers, such as
doc.body
'sonload=""
attribute, for documents that do not have a browsing context.
- ➕ Added encoding handling (nicolashenry)
-
v8.4.1 Changes
- 🛠 Fixed an issue where setting
selected
on an multi-select would clear all other selectedness.
- 🛠 Fixed an issue where setting
-
v8.4.0 Changes
- ➕ Added an implementation of the
TreeWalker
class (anddocument.createTreeWalker
). (garycourt) - 🛠 Fixed a few minor bugs in URL parsing and the
URL
API, by upgrading towhatwg-url
v2.0.1. - 🛠 Fixed a few issues with generated files in the published package, which seem to have impacted webpack users.
- ➕ Added an implementation of the