fb55/domhandler
Handler for htmlparser2, to get a DOM
17 Releases
Latest: 3mo ago
v6.0.1Latest
📋 What's Changed
- [add JSR import map for domelementtype](https://github.com/fb55/domhandler/commit/39183cd67758864ffca49bf7a29a19b710dd4582)
- Full Changelog: https://github.com/fb55/domhandler/compare/v6.0.0...v6.0.1
v6.0.0
📋 What's Changed
- BREAKING: domhandler is now ESM-only https://github.com/fb55/domhandler/pull/1867
- Full Changelog: https://github.com/fb55/domhandler/compare/v5.0.3...v6.0.0
v5.0.3
📋 Changes
- fix: Allow `Document` to be a `ChildNode` 02387d3
v5.0.2
📋 Changes
- Fixed `ChildNode` as a tagged union d7f9a0f
v5.0.1
📋 Changes
- Fixed `isComment` return type b87ed12
v5.0.0
📋 Changes
- Removed the deprecated `normalizeWhitespace` option (#614) 6503e2d
- Updated nodes to use tagged unions for node types (#804) acc934b
- This might break some TypeScript code
- Added an ESM build (#806) 5582477
v4.3.1
📋 What's Changed
- fix(node): Correct parse5 location types (0fcbbb8)
- Full Changelog: https://github.com/fb55/domhandler/compare/v4.3.0...v4.3.1
v4.3.0
📋 Changes
- Add missing `Node` properties from parse5, add docs 3be6f56
v4.2.2
📋 Changes
- Revert "refactor: Remove deprecated `normalizeWhitespace` option (#614)" a841df3
v4.2.1
📋 Changes
- __BREAKING, REVERTED IN `4.2.2`:__ Removed the deprecated `normalizeWhitespace` option (#614) 018ddf9
- This should not have been part of this release. `4.2.2` adds the option again.
- fix: Update end index for text events (#621) d88e5b0
- fix: Have `isText` return whether the node is a text node c323224
- Add descriptions for Node classes 2475d2e
v4.2.0
📋 Changes
- Node improvements d5422c2
- feat(node): Add type check functions
- Eg. `isDocument`, `isTag`. Useful for determining if a node matches a particular type.
- Make `cloneNode` return the passed type
- Eg. `cloneNode` called with a `Text` node will now return a `Text` node.
v4.1.0
📋 Changes
- fix: All elements should have `type: tag` in `xmlMode` 3977aab
- Bump domelementtype from 2.1.0 to 2.2.0 86a6f84
v4.0.0
📋 Changes
- Add parse5 DOM extensions to types and add support in `cloneNode` bde2dc5
- Add dedicated `Document` class de7c6d0
- Add a root element to tree 4b8d326
- __BREAKING:__ Some nodes will now have a parent node where they did not have one before.
- Remove `_` from private property names 340fcd8
- __BREAKING:__ This might break your code if you were using private properties previously, eg. in a custom handler.
- Clone indices as well (#352 by @neet) ea60538
- Run test on ppc64le as well (#398 by @nageshlop) 3d3c278
v3.3.0
📋 Changes
- Add `cloneNode` method & function 5babe0d
v3.2.0
📋 Changes
- Make DOM serializable by Jest
- Jest now properly renders the produced DOM in snapshots.
v3.1.0
📋 Changes
- `package.json` improvements:
- Publish only lib folder (#263 by @TrySound)
- Add `types` entry (fixes #132)
- Add `sideEffects: false` (#232 by @ericjeney)
- Add access modifiers across the codebase
- Improve test coverage
- Update funding information
Port to TypeScript, Jestv3.0.0
The `withDomLvl1` option was removed. Instead, there are now three different types of nodes, which all have a backing class that adds all of the previously available DOM level 1 properties by default. Exports were changed slightly.
