···4455Morphlex is a ~2.3KB (gzipped) DOM morphing library that transforms one DOM tree to match another while preserving element state and making minimal changes.
6677+## What makes Morphlex different?
88+99+1. No cascading mutations from inserts. Simple inserts should be one DOM operation.
1010+2. No cascading mutations from removes. Simple removes should be one DOM operation.
1111+3. No cascading mutations from partial sorts. Morphlex finds the longest increasing subsequence for near optimal partial sorts.
1212+4. It uses `moveBefore` when available, preserving state.
1313+5. It uses `isEqualNode`, but in a way that is sensitive to the value of form inputs.
1414+6. It uses id sets inspired by Idiomorph.
1515+716## Installation
817918```bash
···7079- **`beforeChildrenVisited`**: Called before an element's children are visited during morphing. Return `false` to skip visiting children.
71807281- **`afterChildrenVisited`**: Called after an element's children have been visited and morphed.
7373-7474-## What makes Morphlex different?
7575-7676-1. No cascading mutations from inserts. Simple inserts should be one DOM operation.
7777-2. No cascading mutations from removes. Simple removes should be one DOM operation.
7878-3. No cascading mutations from partial sorts. Morphlex finds the longest increasing subsequence for near optimal partial sorts.
7979-4. It uses `moveBefore` when available, preserving state.
8080-5. It uses `isEqualNode`, but in a way that is sensitive to the value of form inputs.
8181-6. It uses id sets inspired by Idiomorph.