All Versions
201
Latest Version
Avg Release Cycle
36 days
Latest Release
31 days ago

Changelog History
Page 3

  • v11.6.1

    • 🛠 Fixed one regression (since v11.6.0) in <style> elements, where their sheet property would sometimes be null when it should not be.
    • 🛠 Fixed a case where a <style> element's sheet property would be left as a CSSStyleSheet despite it not being in the document.

    💅 Another regression remains where we are emitting spurious CSS-parsing jsdomError events; see #2123. We also discovered a large amount of preexisting brokenness around <style>, <link>, and @import; see #2124 for more details.

    We'll try to fix these soon, especially the regression.

  • v11.6.0

    • ➕ Added a fully-functioning WebSocket implementation!
    • ➕ Added a window.performance implementation, including the basics of the High Resolution Time specification: performance.now(), performance.timeOrigin, and performance.toJSON().
    • ➕ Added support for all of the public API of HTMLMeterElement, except for meterEl.labels.
    • ➕ Added the locationbar, menubar, personalbar, scrollbars, statusbar, and toolbar properties to Window.
    • ➕ Added more properties to window.screen: availWidth, availHeight, colorDepth, and pixelDepth. All of its properties are now getters as well.
    • ➕ Added window.devicePixelRatio.
    • ➕ Added getModifierState() to MouseEvent and KeyboardEvent.
    • ➕ Added a setter for HTMLInputElement's files property.
    • ➕ Added support for the endings option to the Blob constructor.
    • 🛠 Fixed firing various event firings to have the correct default values, e.g. the properties of MouseEvent when using element.click().
    • 🛠 Fixed the firing of popstate and hashchange events during fragment navigation to make them trusted events.
    • 🛠 Fixed data: URL parsing to not include the fragment portions.
    • 🛠 Fixed all URL-accepting properties to properly perform scalar value string conversion and URL resolution.
    • 🛠 Fixed many other small edge-case conformance issues in the API surface of various web APIs; see #2053 and #2081 for more information.
    • 🛠 Fixed various APIs to use ASCII lowercasing, instead of Unicode lowercasing, for element and attribute names.
    • 🛠 Fixed the encoding of a document created via new Document() to be UTF-8.
    • 🛠 Fixed event handler properties behavior when given non-callable objects.
    • 🐎 Increased the performance of parsing HTML documents with large numbers of sibling elements.
    • ✂ Removed probablySupportsContext() and setContext() from HTMLCanvasElement, per spec updates.
    • ✂ Removed the nonstandard window.scrollLeft and window.scrollTop properties, and the window.createPopup() method.
  • v11.5.1

    🚀 (This should have been a minor release; oops.)

    • ➕ Added AbortSignal and AbortController.
    • 🛠 Fixed validation for file <input>s and implemented validation for more input types.
  • v11.4.0

    🚀 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.
  • v11.3.0

    🚀 For this release we'd like to formally welcome @TimothyGu to the core team, as a prolific contributor. He will join the illustrious ranks of those who do so much work on jsdom that we no longer note their names in the changelog.

    • ➕ Added table.tHead, table.tFoot, and table.caption setters, and the table.createTBody() method.
    • ➕ Added CompositionEvent and WheelEvent classes.
    • ➕ Added a <details> element implementation. (Zirro)
    • ➕ Added stub <marquee> and <picture> element implementations. (Zirro)
    • ⚡️ Updated uiEvent.initUIEvent(), keyboardEvent.initKeyboardEvent(), and mouseEvent.initiMouseEvent() to match the latest specifications.
    • Converted DOMTokenList (used by, e.g., element.classList) to use proxies for improved specification compliance and "liveness".
    • 🛠 Fixed the DOMException class to be spec-compliant, including its constructor signature.
    • 🛠 Fixed some subtle interactions between inline event handlers and other event listeners.
    • 🛠 Fixed the element interface used when creating many of the more obscure elements.
    • 🛠 Fixed the behavior of the table.rows getter, and the table.createCaption() and table.deleteRow() methods.
    • 🛠 Fixed incorrect sharing of methods between interfaces that used mixins (e.g. previously document.querySelector === documentFragment.querySelector, incorrectly).
    • 🛠 Fixed FocusEvent creation, which regressed in v11.2.0.
    • 🛠 Fixed UIEvent to only allow initializing with Window objects for its view property.
    • 🛠 Fixed the behavior of tr.rowIndex and tr.deleteCall().
    • 🛠 Fixed the element interface for <td> and <th> to be simply HTMLTableCellElement, and improved that class's spec compliance.
    • 🛠 Fixed calling label.click() to not trigger the labeled control's activation behavior when the control is disabled. (schreifels)
    • 🛠 Fixed document.getElementsByName() to return a NodeList instead of a HTMLCollection. (Zirro)
    • 🔀 Significantly sped up synchronous XMLHttpRequest. (Zirro)
  • v11.2.0

    🚀 This release brings with it a much-awaited infrastructure change, as part of webidl2js v7.3.0 by the ever-amazing TimothyGu: jsdom can now generate spec-compliant versions of classes that have "Proxy-like" behavior, i.e. allow getting or setting keys in unusual ways. This enables a number of improvements, also by TimothyGu:

    • Significantly improved the spec-compliance and "liveness" of both NodeList and HTMLCollection, such that retrieving properties via indices or (in HTMLCollection's case) id/name values will always work correctly.
    • ➕ Added element.dataset support.
    • ➕ Added indexed and named access to <select> elements, as well as the corresponding item() and namedItem() methods.
    • ➕ Added suport for FileList indexed properties, i.e. fileList[i].
    • Made select.options an instance of the newly-implemented HTMLOptionsCollection, instead of just a HTMLCollection.

    This infrastructure will allow us to improve and implement many other similar behaviors; that work is being tracked in #1129.

    In addition to these improvements to the object model, we have more work to share:

    • ➕ Added no-op APIs document.clear(), document.captureEvents(), document.releaseEvents(), window.external.AddSearchProvider(), and window.external.IsSearchProviderInstalled(). (Zirro)
    • ➕ Added active checks to prevent reentrancy in TreeWalker and NodeIterator.
    • ⚡️ Updated the interaction between a <textarea>'s value, defaultValue, and textContent per a recent spec change
    • 🛠 Fixed elements with id="undefined" shadowing the undefined property of the global object. (TimothyGu)
    • 🛠 Fixed matching in getElementsByClassName() to be ASCII case-insensitive, instead of using JavaScript's toLowerCase().
    • 👌 Improved some behaviors around navigating to fragments. (ForbesLindesay)
    • 👌 Improved XMLHttpRequest and FileReader behavior, mainly around event handlers, abort(), and network errors.
    • 👌 Improved edge-case spec compliance of NodeIterator.
  • v11.1.0

    • ➕ Added javascript: URL "navigation" via window.location, at least by evaluating the side effects. It still doesn't actually navigate anywhere. (ForbesLindesay)
    • ⚡️ Updated whatwg-url to v6.1.0, bringing along origin serialization changes and URLSearchParams among various other fixes. (ForbesLindesay)
    • 🛠 Fixed javascript: URL loading for iframes to do proper percent-decoding and error reporting.
    • 🛠 Fixed corrupted XMLHttpRequest responses when they were over 1 MiB.
    • 🛠 Fixed timers to not start after a window is close()d, which could cause strange errors since most objects are unusable at that point. (Enverbalalic)
  • v11.0.0

    💥 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.
  • v10.1.0

    • ➕ Added the value sanitization algorithm for password, search, tel, text, color, email, and url input types. (Zirro)
    • ➕ Added Symbol.toStringTag to all web platform classes, so that now Object.prototype.toString.call() works as expected on jsdom objects.
    • ➕ Added the select.selectedOptions property.
    • ✂ Removed the toString() methods on various prototypes that returned "[object ClassName]" in an attempt to fake the Symbol.toStringTag behavior.
    • 🔄 Changed XMLHttpRequest to pre-allocate a 1 MiB buffer, which it grows exponentially as needed, in order to avoid frequent buffer allocation and concatenation. (skygon)
    • 🛠 Fixed a variety of properties that were meant to always return the same object, to actually do so. (Zirro)
    • 🛠 Fixed inheritance of the runScripts and resources options into iframes.
    • 🛠 Fixed an uncaught exception that occurred if you called xhr.abort() during a readystatechange event.
  • v10.0.0

    📚 This release includes a complete overhaul of jsdom's API for creating and manipulating jsdoms. The new API is meant to be much more intuitive and have better defaults, with complete documentation in the newly-overhauled README. We hope you like it!

    👍 As discussed in the new README, the old API is still available and supported via require("jsdom/lib/old-api.js"), at least until we have ported all of its features over to the new API. It will, however, not be gaining any new features, and we suggest you try the new API unless you really need the customizable resource loading the old API provides.

    Apart from the new API, the following changes were made, with breaking changes bolded:

    • Removed support for Node.js v4 and v5, as we have started using new JavaScript features only supported in Node.js v6 onwards.
    • 🔄 Changed the omitJsdomErrors option to omitJSDOMErrors, for consistency with web platform APIs.
    • ➕ Added document.dir. (Zirro)
    • ⚡️ Updated the <a> and <area> APIs to the latest specification, and fixed a few bugs with them. (makana)
    • 🛠 Fixed <img> elements to no longer fire load events unless their image data is actually loaded (which generally only occurs when the canvas package is installed).
    • 🛠 Fixed XMLHttpRequest preflights to forward approved preflight headers to the actual request. (mbroadst)
    • 🛠 Fixed htmlElement.dir to properly restrict its values to "ltr", "rtl", or "auto". (Zirro)
    • 🛠 Fixed setting innerHTML to the empty string to no longer be a no-op. (Zirro)
    • 🛠 Fixed the origin-checking logic in window.postMessage(), so that now you don't always have to pass an origin of "*". (jmlopez-rod)
    • 👌 Improved the xhr.open() error message when there are not enough arguments. (lencioni)