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

# htmlparser2 breaking changes

htmlparser2 12.0.0 (March 20, 2026) is its newest release with breaking changes, 11 of them. The first: Tag names inside svg are now case-adjusted in htmlparser2 12.0.0. Every breaking API change we have recorded in htmlparser2 on npm: 20 breaking changes in 3 versions. Below, its 3 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `12.0.0`, released March 20, 2026. [Source repository](https://github.com/fb55/htmlparser2)

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

- From [11.0.0](#v-11-0-0) to [12.0.0](#v-12-0-0): 11 breaking changes in 1 version.
- From [10.0.0](#v-10-0-0) to [12.0.0](#v-12-0-0): 18 breaking changes in 2 versions.

## htmlparser2 12.0.0 breaking changes

htmlparser2 12.0.0, released March 20, 2026: 11 breaking changes.

- **Behavior changed**  

Names such as foreignObject and clipPath are case-adjusted per spec, so tag name strings change. [github.com](https://github.com/fb55/htmlparser2/releases/tag/v12.0.0)
- **Behavior changed**  

These tags are now raw-text tags per the WHATWG spec, so code relying on parsed child content inside them will see different output. [github.com](https://github.com/fb55/htmlparser2/releases/tag/v12.0.0)
- **Behavior changed**  

Textarea entities are decoded like title already was, so text output of textarea content changes. [github.com](https://github.com/fb55/htmlparser2/releases/tag/v12.0.0)
- **Behavior changed**  

A second form inside an open form is now dropped, changing the parsed tree. [github.com](https://github.com/fb55/htmlparser2/releases/tag/v12.0.0)
- **Behavior changed**  

Opening h1 to h6 closes other headings and opening a closes a previous a, changing the resulting tree. [github.com](https://github.com/fb55/htmlparser2/releases/tag/v12.0.0)
- **Behavior changed**  

Code that expected \</> to appear as text will no longer receive it. [github.com](https://github.com/fb55/htmlparser2/releases/tag/v12.0.0)
- **Behavior changed**  

Previously silently dropped \<?...> and non-DOCTYPE \<!...> now appear as comment nodes in HTML mode. [github.com](https://github.com/fb55/htmlparser2/releases/tag/v12.0.0)
- **Behavior changed**  

The slash is ignored per spec unless recognizeSelfClosing is enabled, so content after a self-closing script or style changes. [github.com](https://github.com/fb55/htmlparser2/releases/tag/v12.0.0)
- **Behavior changed**  

\<image> is now reported as \<img> in HTML mode, changing tag names users receive. [github.com](https://github.com/fb55/htmlparser2/releases/tag/v12.0.0)
- **Behavior changed**  

CDATA sections inside svg and math content are parsed as text instead of CDATA handling. [github.com](https://github.com/fb55/htmlparser2/releases/tag/v12.0.0)
- **Signature changed** `Tokenizer.constructor`  

Was constructor({xmlMode, decodeEntities}: {xmlMode?: boolean; decodeEntities?: boolean;}, cbs: Callbacks); now constructor({xmlMode, decodeEntities, recognizeSelfClosing}: {xmlMode?: boolean; decodeEntities?: boolean... [npmjs.com](https://www.npmjs.com/package/htmlparser2/v/12.0.0)

## htmlparser2 11.0.0 breaking changes

htmlparser2 11.0.0, released March 19, 2026: 7 breaking changes.

- **Removed**  

The module is now ESM only, so CommonJS require() is not supported in legacy environments. Use import instead. [github.com](https://github.com/fb55/htmlparser2/releases/tag/v11.0.0)
- **Removed** `createDomStream`  

Use createDocumentStream instead. [npmjs.com](https://www.npmjs.com/package/htmlparser2/v/11.0.0)
- **Removed** `parseDOM`  

The deprecated parseDOM function was removed. Stop calling it. [npmjs.com](https://www.npmjs.com/package/htmlparser2/v/11.0.0)
- **Removed** `Parser.done`  

Parser.done was removed in htmlparser2 11.0.0 [npmjs.com](https://www.npmjs.com/package/htmlparser2/v/11.0.0)
- **Removed** `Parser.parseChunk`  

Parser.parseChunk was removed in htmlparser2 11.0.0 [npmjs.com](https://www.npmjs.com/package/htmlparser2/v/11.0.0)
- **Configuration changed**  

The minimum supported Node.js version is now 20.19.0. [github.com](https://github.com/fb55/htmlparser2/releases/tag/v11.0.0)
- **Configuration changed**  

Dependencies domhandler, domutils, domelementtype and entities moved to new major versions, which may affect code relying on their APIs. [github.com](https://github.com/fb55/htmlparser2/releases/tag/v11.0.0)

## htmlparser2 10.0.0 breaking changes

htmlparser2 10.0.0, released December 24, 2024: 2 breaking changes.

- **Removed**  

The writable stream import path was simplified, so code importing the old path must switch to the new one. The release notes do not name the new path. [github.com](https://github.com/fb55/htmlparser2/releases/tag/v10.0.0)
- **Renamed** `lib/WritableStream:WritableStream`  

Use WritableStream instead. [npmjs.com](https://www.npmjs.com/package/htmlparser2/v/10.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.
