npm / domhandler
domhandler
What changed in domhandler 3 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-23.
6 breaking3 new APIs and options2 behavior and defaults1 tooling1 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initdomhandler 62 changes
Breaking changes 1
domhandler is now ESM-only, so CommonJS usage is no longer supported.
Tooling 1
A JSR import map was added for domelementtype.
domhandler 53 changes
Breaking changes 2
Nodes now use tagged unions for node types, which might break some TypeScript code.
The deprecated normalizeWhitespace option was removed.
New APIs and options 1
An ESM build was added.
domhandler 45 changes
Breaking changes 2
Removes underscores from private property names, which might break code using those properties, such as in a custom handler.
Adds a root element to the tree; some nodes now have a parent node where they did not before.
New APIs and options 1
Adds a dedicated Document class.
Behavior and default changes 1
Adds support for parse5 DOM extensions in the types and in cloneNode.
Fixes and other changes 1
Clones indices as well.
domhandler 33 changes
Breaking changes 1
The withDomLvl1 option was removed; DOM level 1 properties are now added by default through backing classes for the node types.
New APIs and options 1
Three different types of nodes now have backing classes that add all previously available DOM level 1 properties by default.
Behavior and default changes 1
Exports changed slightly.