domhandler is a Node.js library that builds a DOM-like tree from HTML parsed by htmlparser2. It’s useful for turning raw HTML into structured nodes that can be manipulated with domutils or cheerio, and rendered using dom-serializer.
Project status
- Actively maintained: The repo shows an upstream push on 2026-06-02, and there are recent published updates (v6.0.0 and v6.0.1 in March 2026), indicating ongoing maintenance rather than abandonment.
- Update cadence: After a long quiet period since 2022-04-30 (v5.0.3), there were two updates within about 24 hours in 2026-03-17 (v6.0.0, then v6.0.1), followed by no additional versioned updates in the provided list.
AI summary generated Today
Recent updates
v6.0.1
2 months agov6.0.1 primarily updates the release publishing process to include a JSR import map entry for `domelementtype`. The code diff shows no library source/API changes, but it does update package versioning metadata and dev tooling dependencies in the lockfiles.
v6.0.0
2 months agov6.0.0 makes domhandler ESM-only, as stated in the release notes. The codebase also underwent a larger modernization pass (build output paths, tooling, and multiple dependency major upgrades), with some potentially breaking changes not fully called out in the release notes.
Breakingv5.0.3
4/30/2022v5.0.3 primarily updates the TypeScript DOM node typing so that `Document` can be treated as a `ChildNode`. In the actual diff, there are also several undocumented repository-level changes (CI workflow actions, lint/format scripts) and significant devDependency bumps reflected in package.json and package-lock.json.
v5.0.2
4/9/2022Release v5.0.2 makes a TypeScript typing fix for domhandler's `ChildNode` type. The code change narrows `ChildNode` into an explicit tagged union of specific node types.
Breakingv5.0.1
4/8/2022v5.0.1 makes a targeted TypeScript typing fix for the `isComment` type guard. Runtime behavior appears unchanged, with only the return type annotation adjusted, plus normal package version bumps.
v5.0.0
4/8/2022v5.0.0 removes the deprecated `normalizeWhitespace` option and refactors the DOM node model to use tagged unions. It also introduces an ESM build via package entry point changes. The main functional changes are centered on type model restructuring and removal of the whitespace normalization behavior.
BreakingFeaturesv4.3.1
3/19/2022v4.3.1 primarily adjusts TypeScript types for parse5 source code location information (node and element location fields). In addition, the repo updates CI workflow actions and bumps several devDependency versions, which show up in the lockfile but are not described in the release notes.
v4.3.0
11/30/2021v4.3.0 extends domhandler's Node types with additional parse5-derived location and namespace metadata. The primary runtime change is that new properties can now be stored on nodes, and cloneNode will preserve them when present. The release notes only mention “missing Node properties from parse5” and docs, but the diff also includes cloning behavior updates and multiple dev/tooling dependency bumps.
Featuresv4.2.2
8/29/2021v4.2.2 reverts a breaking change from v4.2.1 related to the deprecated `normalizeWhitespace` option. The code, tests, and README are updated to restore the option’s previous behavior when enabled.
v4.2.1
8/29/2021v4.2.1 removes the deprecated `normalizeWhitespace` option (note says it should have been reverted in this release, and is re-added in v4.2.2). It also includes correctness fixes around node endIndex calculation for text handling and improves the `isText` type guard, plus added JSDoc descriptions for node classes.
Breaking