jsdom v8.1.0 Release Notes
-
- ➕ Added
attr.nodeName
, which was recently re-added to the spec. - ➕ Added click-proxying behavior from
<label>
s to their labeled form elements. (yaycmyk) - ➕ Added a setter for
element.classList
per recent spec changes (it forwards toelement.classList.value
). - ⚡️ Updated our attributes implementation in a few ways for recent spec changes and to fix discovered bugs:
- Added
element.getAttributeNames()
. (spec addition) setAttributeNode
andsetAttributeNodeNS
can now replace an attribute node, instead of removing the old one and adding a new one; this avoids changing the order in the attribute list. (spec change)NamedNodeMap
named properties are now lowercase (except in edge cases involving XML documents or non-HTML elements). (spec change)NamedNodeMap
named properties are now non-enumerable.- The
"DOMAttrModified"
mutation event'srelatedNode
is now the newAttr
object, not theNode
, as per spec.
- Added
- ⚡️ Updated
DOMTokenList
to have avalue
property per recent spec changes; itstoString
serialization also changed slightly. - ⚡️ Updated
tc.headers
to be aDOMTokenList
that simply reflects theheaders
attribute; previously it was a string, with its computation doing some weird stuff. - 🛠 Fixed
document.implementation.createDocument()
to create a document with its parsing mode set to XML, which affects a variety of DOM APIs in small ways. - 🛠 Fixed
EventTarget.prototype.constructor
to be correct; it was previouslyWindow
. - 🛠 Fixed
option.index
for<option>
s not inside a<select>
to no longer error. - 🛠 Fixed
tc.cellIndex
for<td>
s and<th>
s not inside a<tr>
to no longer error. - 🛠 Fixed
tr.sectionRowIndex
for<tr>
s not inside a<table>
,<tbody>
,<thead>
, or<tfoot>
to no longer error. - ✂ Removed the
"keyevents"
alias for"keyboardevent"
when usingdocument.createEvent
, per recent spec changes.
- ➕ Added