jsdom v11.0.0 Release Notes

  • ๐Ÿ’ฅ Breaking changes:

    • ๐Ÿšง Custom parsers, via the 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.
    • โฌ†๏ธ Due to a parse5 upgrade, the location info objects returned by dom.nodeLocation() or the old API's jsdom.nodeLocation() now have a different structure.
    • Fixed how runScripts applies to event handler attributes; now they will no longer be converted into event handler functions unless runScripts: "dangerously" is set. However, event handler properties will now work with any runScripts option value, instead of being blocked.

    Other changes:

    • Overhauled how event handler properties and attributes work to follow the spec. In particular, this adds various 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.
    • โฌ†๏ธ Upgraded parse5 from v1 to v3, bringing along several correctness improvements to HTML parsing. (Zirro)
    • โšก๏ธ Updated Location properties 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 TypeError when given invalid values. (TimothyGu)
    • ๐Ÿ›  Fixed the Symbol.toStringTag properties to be non-writable and non-enumerable. (TimothyGu)
    • ๐Ÿ›  Fixed tokenList.remove() when the DOMTokenList corresponded to a non-existant attribute. (Zirro)
    • ๐Ÿ›  Fixed fileReader.abort() to terminate ongoing reads properly.
    • ๐Ÿ›  Fixed xhr.send() to support array buffer views, not just ArrayBuffers. (ondras)
    • ๐Ÿ›  Fixed non-GET requests to data: URLs using XMLHttpRequest. (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 XMLHttpRequest responses.
      • 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() and blob.isClosed().
    • โœ‚ Removed some remaining not-per-spec toString() methods on various prototypes, which were made redundant in v10.1.0 but we forgot to remove.