---
title: "jsdom 31.0.1 Breaking Changes on npm | Since.dev"
description: "What each jsdom release removed, renamed or changed: 81 breaking changes in 20 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/jsdom
last_updated: 2026-12-04
---

# jsdom breaking changes

jsdom 31.0.1 (November 13, 2026) is its newest release with breaking changes. The first: Behavior changed element.tabIndex. Every breaking API change we have recorded in jsdom on npm: 81 breaking changes in 20 versions. Below, its 20 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `31.0.1`, released November 13, 2026. [Source repository](https://github.com/jsdom/jsdom)

Its 30.0.0 release requires Node.js 22.22.2 or later. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [30.1.3](#v-30-1-3) to [31.0.1](#v-31-0-1): 12 breaking changes in 2 versions.
- From [20.0.0](#v-20-0-0) to [31.0.1](#v-31-0-1): 80 breaking changes in 19 versions.

## jsdom 31.0.1 breaking changes

jsdom 31.0.1, released November 13, 2026: 1 breaking change.

- **Behavior changed** `element.tabIndex`  

Invalid and out-of-range tabindex values now return the element's default instead of zero or wrapping, and values with trailing non-digits use their leading integer. Code that relied on the old values, such as tabindex="1e2" returning 100... [github.com](https://github.com/jsdom/jsdom/releases/tag/v31.0.1)

## jsdom 31.0.0 breaking changes

jsdom 31.0.0, released November 5, 2026: 11 breaking changes.

- **Behavior changed**  

Fonts, antialiasing, and encoded bytes can differ from before. PNG, JPEG, and WebP serialization is supported, and other MIME types fall back to PNG. [github.com](https://github.com/jsdom/jsdom/blob/v31.0.0/README.md)
- **Behavior changed**  

CSS parsing, selector matching and computed styles now use a new integrated implementation. CSS serialization and computed values can differ from previous releases. [github.com](https://github.com/jsdom/jsdom/releases/tag/v31.0.0)
- **Behavior changed** `document`  

The page-completion load event now fires only on the window. Code listening for load on the document must switch to window.addEventListener("load", ...) or window.onload. [github.com](https://github.com/jsdom/jsdom/releases/tag/v31.0.0)
- **Behavior changed** `document.close`  

Script-created input streams now remain open until document.close() is called. Code that depended on the stream closing earlier must call document.close(). [github.com](https://github.com/jsdom/jsdom/releases/tag/v31.0.0)
- **Behavior changed** `document.open`  

document.open, including implicit calls from document.write, now clears event listeners and handlers on the document, its descendants and its window. Re-register any listeners after reopening. [github.com](https://github.com/jsdom/jsdom/releases/tag/v31.0.0)
- **Behavior changed** `JSDOM`  

Parsing pauses at blocking scripts, so the JSDOM constructor can return a partially parsed document. Wait for DOMContentLoaded or the window load event, checking document.readyState first. [github.com](https://github.com/jsdom/jsdom/releases/tag/v31.0.0)
- **Behavior changed** `JSDOM.fromFile`  

Parsing pauses at blocking scripts, so JSDOM.fromFile can return a partially parsed document. Wait for DOMContentLoaded or the window load event, checking document.readyState first. [github.com](https://github.com/jsdom/jsdom/releases/tag/v31.0.0)
- **Behavior changed** `JSDOM.fromURL`  

Parsing pauses at blocking scripts, so JSDOM.fromURL can return a partially parsed document. Wait for DOMContentLoaded or the window load event, checking document.readyState first. [github.com](https://github.com/jsdom/jsdom/releases/tag/v31.0.0)
- **Configuration changed**  

The optional canvas and image decoding backend is now @napi-rs/canvas. Install @napi-rs/canvas v1.0.13 or later alongside jsdom, since installing canvas alone no longer enables this support. Rendering and encoded image bytes can differ. [github.com](https://github.com/jsdom/jsdom/releases/tag/v31.0.0)
- **Configuration changed**  

The latest versions of jsdom need newer Node.js versions. Check the engines field in package.json for the supported range. [github.com](https://github.com/jsdom/jsdom/blob/v31.0.0/README.md)

And 1 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## jsdom 30.1.3 breaking changes

jsdom 30.1.3, released October 15, 2026: 1 breaking change.

- **Behavior changed** `XMLHttpRequest`  

After a cross-origin redirect, XMLHttpRequest no longer sends credentials supplied to xhr.open(), including in response to authentication challenges from the destination. Code relying on that reuse must supply credentials again. [github.com](https://github.com/jsdom/jsdom/releases/tag/v30.1.3)

## jsdom 30.1.1 breaking changes

jsdom 30.1.1, released September 22, 2026: 2 breaking changes.

- **Behavior changed** `element.innerHTML`  

Setting innerHTML on an element in an XML document now throws when an attribute value contains invalid characters, where it previously did not. Check code that writes untrusted markup into XML documents. [github.com](https://github.com/jsdom/jsdom/releases/tag/v30.1.1)
- **Behavior changed** `element.outerHTML`  

Reading outerHTML on an element in an XML document now throws when an attribute value contains invalid characters, where it previously did not. Check code that serializes XML documents with invalid attribute data. [github.com](https://github.com/jsdom/jsdom/releases/tag/v30.1.1)

## jsdom 30.1.0 breaking changes

jsdom 30.1.0, released September 17, 2026: 1 breaking change.

- **Behavior changed** `window.close`  

Calling window.close() now preserves access to the document and its DOM through retained references. Code that relied on the previous teardown behavior should be checked. [github.com](https://github.com/jsdom/jsdom/releases/tag/v30.1.0)

## jsdom 30.0.0 breaking changes

jsdom 30.0.0, released July 27, 2026: 1 breaking change.

- **Behavior changed**  

jsdom 30 requires Node.js ^22.22.2, ^24.15.0 or >=26.0.0. Users on older Node.js versions must upgrade before installing. [github.com](https://github.com/jsdom/jsdom/releases/tag/v30.0.0)

## Older versions

14 older versions, each with its first changes. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

### jsdom 29.0.2 breaking changes

jsdom 29.0.2, released April 7, 2026: 1 breaking change.

- **Behavior changed** `getComputedStyle`  

getComputedStyle() now applies computed value rules across a broader set of properties, so returned values can differ from earlier versions. Code that compares or parses computed styles should be checked. [github.com](https://github.com/jsdom/jsdom/releases/tag/v29.0.2)

### jsdom 29.0.0 breaking changes

jsdom 29.0.0, released March 15, 2026: 6 breaking changes.

- **Removed**  

The minimum supported Node.js v22 version is now v22.13.0. Users on v22.12.0 must upgrade Node.js before using this release. [github.com](https://github.com/jsdom/jsdom/releases/tag/v29.0.0)
- **Behavior changed**  

Fetches to ports listed as bad in the fetch specification are now blocked. Code that fetches from such ports will fail and must use a different port. [github.com](https://github.com/jsdom/jsdom/releases/tag/v29.0.0)

And 4 more in this version.

### jsdom 28.0.0 breaking changes

jsdom 28.0.0, released February 2, 2026: 20 breaking changes.

- **Removed** `"jsdom"`  

"jsdom" was removed in jsdom 28.0.0 [npmjs.com](https://www.npmjs.com/package/jsdom/v/28.0.0)
- **Removed** `FinalizationRegistryConstructor`  

FinalizationRegistryConstructor was removed in jsdom 28.0.0 [npmjs.com](https://www.npmjs.com/package/jsdom/v/28.0.0)

And 18 more in this version.

### jsdom 27.4.0 breaking changes

jsdom 27.4.0, released December 26, 2025: 1 breaking change.

- **Behavior changed**  

XML documents are now decoded as UTF-8 more often instead of sniffing for a meta charset or using the parent frame's encoding. Code that relied on the old encoding detection may see different text. [github.com](https://github.com/jsdom/jsdom/releases/tag/v27.4.0)

### jsdom 27.0.1 breaking changes

jsdom 27.0.1, released October 18, 2025: 1 breaking change.

- **Behavior changed**  

The minimum Node.js version rose from v20.0.0 to v20.19.0, v22.12.0 and v24.0.0. Users on earlier Node.js versions should stay on jsdom v26.1.0. [github.com](https://github.com/jsdom/jsdom/releases/tag/v27.0.1)

### jsdom 27.0.0 breaking changes

jsdom 27.0.0, released September 13, 2025: 9 breaking changes.

- **Removed**  

The minimum supported Node.js version is now v20. Run jsdom on Node.js 20 or later. [github.com](https://github.com/jsdom/jsdom/releases/tag/v27.0.0)
- **Removed** `omitJSDOMErrors`  

Use the jsdomErrors option of forwardTo() to control which errors reach the Node.js console; omitJSDOMErrors is gone. [github.com](https://github.com/jsdom/jsdom/releases/tag/v27.0.0)

And 7 more in this version.

### jsdom 26.0.0 breaking changes

jsdom 26.0.0, released January 9, 2025: 1 breaking change.

- **Removed**  

The optional canvas peer dependency must now be version 3 instead of version 2. Users of canvas v2 must upgrade canvas. [github.com](https://github.com/jsdom/jsdom/releases/tag/v26.0.0)

### jsdom 25.0.0 breaking changes

jsdom 25.0.0, released August 25, 2024: 1 breaking change.

- **Behavior changed** `EventTarget.prototype`  

When runScripts is set to "dangerously" or "outside-only", EventTarget.prototype now inherits from the Object.prototype inside jsdom rather than the Node.js one. Code relying on instanceof checks across realms may behave differently. [github.com](https://github.com/jsdom/jsdom/releases/tag/v25.0.0)

### jsdom 24.1.2 breaking changes

jsdom 24.1.2, released August 25, 2024: 1 breaking change.

- **Behavior changed** `blur`  

Calling blur() no longer fires focus and focusin events on the Document, and blur and focusout events no longer have relatedTarget set. Code that relies on these events or properties must change. [github.com](https://github.com/jsdom/jsdom/releases/tag/v24.1.2)

### jsdom 24.0.0 breaking changes

jsdom 24.0.0, released January 21, 2024: 1 breaking change.

- **Removed** `:has`  

The release switches the selector engine back to nwsapi, which drops support for the :has() pseudo-class. Code that relies on :has() in querySelector or similar calls must be rewritten. [github.com](https://github.com/jsdom/jsdom/releases/tag/v24.0.0)

### jsdom 23.0.0 breaking changes

jsdom 23.0.0, released November 26, 2023: 1 breaking change.

- **Removed**  

Node.js v18 is now the minimum supported version, so users on older Node.js releases must upgrade before installing this version. [github.com](https://github.com/jsdom/jsdom/releases/tag/v23.0.0)

### jsdom 22.0.0 breaking changes

jsdom 22.0.0, released May 2, 2023: 2 breaking changes.

- **Removed**  

jsdom is no longer supported as a browserified bundle for running in the browser, so code relying on that bundle must change. [github.com](https://github.com/jsdom/jsdom/releases/tag/v22.0.0)
- **Removed**  

Node.js v16 is now the minimum supported version, so older Node.js releases are no longer supported. [github.com](https://github.com/jsdom/jsdom/releases/tag/v22.0.0)

### jsdom 21.0.0 breaking changes

jsdom 21.0.0, released January 7, 2023: 18 breaking changes.

- **Behavior changed** `Window.document`  

These Window properties can no longer be redefined or deleted. Code that tried to redefine them must be changed. [github.com](https://github.com/jsdom/jsdom/releases/tag/v21.0.0)
- **Behavior changed** `Window.external`  

Assigning to these Window properties now overrides their value instead of being silently ignored. [github.com](https://github.com/jsdom/jsdom/releases/tag/v21.0.0)

And 16 more in this version.

### jsdom 20.0.0 breaking changes

jsdom 20.0.0, released June 19, 2022: 1 breaking change.

- **Removed**  

jsdom 20 requires Node.js 14 or later. Users on older Node.js versions must upgrade before installing. [github.com](https://github.com/jsdom/jsdom/releases/tag/v20.0.0)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
