8000 Releases Β· jsdom/jsdom Β· GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Releases: jsdom/jsdom

Version 27.0.0-beta.1

06 May 13:05
Compare
Choose a tag to compare
Version 27.0.0-beta.1 Pre-release
Pre-release

Breaking changes:

  • Node.js v20+ is now the minimum supported version.
  • The user agent stylesheet is now derived from the HTML Standard, instead of from Chromium. This might change the results you see from getComputedStyle().
  • The virtual console has seen a number of changes:
    • "jsdomError" events are now documented, with specific type properties and other properties that depend on the type.
    • sendTo() was renamed to forwardTo().
    • The jsdomErrors option to sendTo() can be used to control which errors are sent to the Node.js console. This replaces the previous omitJSDOMErrors boolean option.
    • "jsdomError"s for failed XMLHttpRequest fetches are no longer emitted.
    • The values that are printed when forwarding "jsdomError"s to the Node.js console are streamlined.

Other changes:

  • Fixed the ElementInternals accessibility getters and setters. (They were introduced in v23.1.0, but due to inadequate test coverage never actually worked.)
  • Fixed using Object.defineProperty() on certain objects, such as HTMLSelectElement instances.

Version 27.0.0-beta.0

19 Apr 16:19
Compare
Choose a tag to compare
Version 27.0.0-beta.0 Pre-release
Pre-release

This release includes several changes that might be disruptive, and so are being tested as a beta release before the next major release. Hopefully, they will not be breaking, but your help testing would be appreciated.

New selector engine

Mostly notably, this switches our CSS selector engine from nwsapi to @asamuzakjp/dom-selector. This was attempted back in 23.2.0, but reverted in 24.0.0 because of performance concerns. Since that time, @asamuzakjp/dom-selector has improved its performance significantly. On the real-world benchmarks from #3659, we see the new version taking 1.1x as long (compared to 1.5x with the previous attempt). We hope this lower performance overhead will be enough to allow us to stick with the new selector engine. As a sample of how much more capable it is, 19 independent selector-related bugs were closed by merging in this new version.

Please test with the new selector engine and report back with any performance concerns on the issue tracker, ideally before we make the next stable release.

New event constructors

The other major change in this prerelease is the addition of many new event constructors. Previously, we have avoided implementing event constructors unless we implemented their attendant specification. For example, we did not implement BeforeUnloadEvent since we don't implement unloading of documents; we did not implement BlobEvent since we did not implement the MediaStream Recording specification; etc. However, these are common popular requests, and so we've chosen to implement these event constructors without implementing their related specifications.

If this causes you any problems, e.g. due to breaking feature detection, please open an issue on the issue tracker, ideally before we make the next stable release.

The full list of implemented event constructors is: BeforeUnloadEvent, BlobEvent, DeviceMotionEvent (omitting requestPermission()), DeviceOrientationEvent (omitting requestPermission()), PointerEvent, PromiseRejectionEvent, and TransitionEvent.

Additional changes

The following non-breaking changes are included in this release:

  • Added movementX and movementY to MouseEvent. (These are from the Pointer Lock specification, the rest of which is not implemented.)
  • Changed element.click() to fire a PointerEvent instead of a MouseEvent.
  • Changed certain events to be passive by default.
  • Fixed document.createEvent() to accept a more correct set of event names.

Version 26.1.0

13 Apr 10:24
Compare
Choose a tag to compare
  • Added at least partial support for various SVG elements and their classes: <defs> (SVGDefsElement), <desc> (SVGDescElement), <g> (SVGGElement), <metadata> (SVGMetadataElement), <switch> (SVGSwitchElement), and <symbol> (SVGSymbolElement).
  • Added SVGAnimatedPreserveAspectRatio and SVGAnimatedRect, including support in the reflection layer.
  • Added the SVGSVGElement createSVGRect() method, and the SVGRect type (which is distinct from DOMRect.)
  • Added indexed property support to HTMLFormElement.
  • Updated the SVGElement viewportElement() method to correctly establish the viewport based on ancestor elements.
  • Removed the now-bloated form-data dependency in favor of our own smaller implementation of multipart/form-data serialization. No functional changes are expected.
  • Various performance improvements, caches, microoptimizations, and deferred object creation.

Version 26.0.0

09 Jan 05:58
Compare
Choose a tag to compare

Breaking change: canvas peer dependency requirement has been upgraded from v2 to v3. (sebastianwachter)

Other changes:

  • Added AbortSignal.any(). (jdbevan)
  • Added initial support for form-associated custom elements, in particular making them labelable and supporting the ElementInternals labels property. The form-associated callbacks are not yet supported. (hesxenon)
  • Updated whatwg-url, adding support for URL.parse().
  • Updated cssstyle and rrweb-cssom, to improve CSS parsing capabilities.
  • Updated nwsapi, improving CSS selector matching.
  • Updated parse5, fixing a bug around <noframes> elements and HTML entity decoding.
  • Fixed JSDOM.fromURL() to properly reject the returned promise if the server redirects to an invalid URL, instead of causing an uncaught exception.

Version 25.0.1

22 Sep 05:01
Compare
Choose a tag to compare
  • Updated dependencies, notably tough-cookie, which no longer prints a deprecation warning.

Version 25.0.0

25 Aug 10:53
Compare
Choose a tag to compare

This major release changes the prototype of a jsdom's EventTarget.prototype to point to the Object.prototype inside the jsdom, instead of pointing to the Node.js Object.prototype. Thus, the prototype chain of Window stays entirely within the jsdom, never crossing over into the Node.js realm.

This only occurs when runScripts is set to non-default values of "dangerously" or "outside-only", as with the default value, there is no separate Object.prototype inside the jsdom.

This will likely not impact many programs, but could cause some changes in instanceof behavior, and so out of an abundance of caution, we're releasing it as a new major version.

Version 24.1.3

25 Aug 10:47
Compare
Choose a tag to compare
  • Fixed calls to postMessage() that were done as a bare property (i.e., postMessage() instead of window.postMessage()).

Version 24.1.2

25 Aug 09:34
Compare
Choose a tag to compare
  • Fixed an issue with the in operator applied to EventTarget methods, e.g. 'addEventListener' in window, which only appeared in Node.js β‰₯22.5.0. (legendecas)
  • Fixed the events fired by blur(): it no longer fires focus and focusin on the Document, and blur and focusout no longer have their relatedTarget property set. (asamuzaK)

Version 24.1.1

21 Jul 05:10
Compare
Choose a tag to compare
  • Fixed selection methods to trigger the selectionchange event on the Document object. (piotr-oles)

Version 24.1.0

26 May 09:23
Compare
Choose a tag to compare
  • Added the getSetCookie() method to the Headers class. (ushiboy)
  • Fixed the creation and parsing of elements with names from Object.prototype, like "constructor" or "toString".
  • Updated rweb-cssom, which can now parse additional CSS constructs.
0