Skip to content

Commit 304085e

Browse files
committed
Move readme sections around
1 parent 7ec4abe commit 304085e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@
44

55
Morphlex is a ~2.3KB (gzipped) DOM morphing library that transforms one DOM tree to match another while preserving element state and making minimal changes.
66

7+
## What makes Morphlex different?
8+
9+
1. No cascading mutations from inserts. Simple inserts should be one DOM operation.
10+
2. No cascading mutations from removes. Simple removes should be one DOM operation.
11+
3. No cascading mutations from partial sorts. Morphlex finds the longest increasing subsequence for near optimal partial sorts.
12+
4. It uses `moveBefore` when available, preserving state.
13+
5. It uses `isEqualNode`, but in a way that is sensitive to the value of form inputs.
14+
6. It uses id sets inspired by Idiomorph.
15+
716
## Installation
817

918
```bash
@@ -70,12 +79,3 @@ morph(currentNode, newNode, {
7079
- **`beforeChildrenVisited`**: Called before an element's children are visited during morphing. Return `false` to skip visiting children.
7180

7281
- **`afterChildrenVisited`**: Called after an element's children have been visited and morphed.
73-
74-
## What makes Morphlex different?
75-
76-
1. No cascading mutations from inserts. Simple inserts should be one DOM operation.
77-
2. No cascading mutations from removes. Simple removes should be one DOM operation.
78-
3. No cascading mutations from partial sorts. Morphlex finds the longest increasing subsequence for near optimal partial sorts.
79-
4. It uses `moveBefore` when available, preserving state.
80-
5. It uses `isEqualNode`, but in a way that is sensitive to the value of form inputs.
81-
6. It uses id sets inspired by Idiomorph.

0 commit comments

Comments
 (0)