jsdom v11.4.0 Release Notes

  • ๐Ÿš€ 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.

    • โž• Added a rudimentary set of SVG element classes, namely SVGElement, SVGGraphicsElement, SVGSVGElement, SVGTests, SVGAnimatedString, SVGNumber, and SVGStringList. The main impact here is that SVG elements are now instances of SVGElement, instead of being simply Element (as they were in v11.3.0) or HTMLUnknownElement (as they were in v11.2.0 and previously). The only concrete subclass that is implemented is SVGSVGElement, for <svg> itself; other tags will not map to their correct classes, because those classes are not yet implemented.
    • โž• Added the new pretendToBeVisual option, which controls the presence of the new requestAnimationFrame() and cancelAnimationFrame() methods, and the new values of document.hidden/document.visibilityState. See the README for more information. (SimenB)
    • โž• Added the append() and prepend() methods to Document, DocumentFragment, and Element. (caub)
    • โž• Added the before(), after(), and replaceWith() methods to DocumentType, Element, and CharacterData. (caub)
    • โž• Added node.isConnected.
    • โž• Added node.isSameNode().
    • โž• Added support for parsing CDATA sections in XML documents, including in domParser.parseFromString(). (myabc)
    • โž• Added appropriate input.value getter/setter logic for <input type="file">.
    • Significantly improved the spec-compliance of NamedNodeMap, i.e. of element.attributes, such that retrieving named or indexed properties will now always work properly.
    • ๐Ÿ›  Fixed domParser.parseFromString() to not parse HTML character entities in XML documents. (myabc)
    • ๐Ÿ›  Fixed xhr.abort() to clear any set headers.
    • ๐Ÿ›  Fixed XMLHttpRequest to always decoded responses as UTF-8 when responseType is set to "json".
    • ๐Ÿ›  Fixed XMLHttpRequest CORS header handling, especially with regard to preflights and Access-Control-Allow-Headers. (ScottAlbertine)
    • ๐Ÿ›  Fixed the behavior of radioButton.click() to fire appropriate input and change events. (liqwid)
    • ๐Ÿ›  Fixed querySelector()/querySelectorAll() behavior for SVG elements inside <template> contents DocumentFragments, including those created by JSDOM.fragment(). (caub)
    • ๐Ÿ›  Fixed the line number reporting in exception stack traces when using <script> elements, when includeNodeLocations is set.
    • โœ‚ Removed the <applet> element, following the spec.