Breaking changes:
- Custom parsers, via the
parseroption 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. - Due to a parse5 upgrade, the location info objects returned by
dom.nodeLocation()or the old API'sjsdom.nodeLocation()now have a different structure. - Fixed how
runScriptsapplies 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 anyrunScriptsoption value, instead of being blocked.
Other changes:
- Overhauled how event handler properties and attributes work to follow the spec. In particular, this adds various
oneventnameproperties 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. - Upgraded parse5 from v1 to v3, bringing along several correctness improvements to HTML parsing. (@Zirro)
- Updated
Locationproperties to be on the instance, instead of the prototype, and to be non-configurable. - Significantly improved the performance of
HTMLCollection, and thus of parsing large documents. (@Zirro) - Significantly improved the performance of
getComputedStyle()by removing unsupported selectors from the default style sheet. (@flaviut) - Fixed all web platform methods that accepted web platform objects to perform proper type checks on them, throwing a
TypeErrorwhen given invalid values. (@TimothyGu) - Fixed the
Symbol.toStringTagproperties to be non-writable and non-enumerable. (@TimothyGu) - Fixed
tokenList.remove()when theDOMTokenListcorresponded to a non-existant attribute. (@Zirro) - Fixed
fileReader.abort()to terminate ongoing reads properly. - Fixed
xhr.send()to support array buffer views, not justArrayBuffers. (@ondras) - Fixed non-
GETrequests todata:URLs usingXMLHttpRequest. (@Zirro) - Fixed form submission to no longer happen for disconnected forms.
- Fixed body event handler attributes to be treated like all others in terms of how they interact with
runScripts. - Many updates per recent spec changes: (@Zirro)
- Updated
tokenList.replace()edge-case behavior. - Invalid qualified names now throw
"InvalidCharacterError"DOMExceptions, instead of"NamespaceError"DOMExceptions. - Changed
input.select()to no longer throw on types where selection does not apply. - Updated
event.initEvent()and various related methods to have additional defaults. - Stopped lowercasing headers in
XMLHttpRequestresponses. - Started lowercasing headers in
xhr.getAllResponseHeaders(), and separating the header values with a comma-space (not just a comma). - Allow a redirect after a CORS preflight when using
XMLHttpRequest. - Tweaked username/password CORS treatment when using
XMLHttpRequest. - Changed
xhr.overrideMimeType()to no longer throw for invalid input. - Removed
blob.close()andblob.isClosed().
- Updated
- Removed some remaining not-per-spec
toString()methods on various prototypes, which were made redundant in v10.1.0 but we forgot to remove.