native-document 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/anchor.md +5 -1
- package/elements.js +1 -1
- package/package.json +1 -1
- package/src/elements/anchor.js +1 -1
package/docs/anchor.md
CHANGED
|
@@ -6,9 +6,13 @@ Anchors are a NativeDocument class that enables dynamic DOM manipulation without
|
|
|
6
6
|
|
|
7
7
|
Anchors are instances of the Anchor class that use two comment nodes as invisible markers:
|
|
8
8
|
|
|
9
|
+
`NativeDocumentFragment is Anchor alias`
|
|
10
|
+
|
|
9
11
|
```javascript
|
|
10
12
|
// Create an anchor instance
|
|
11
13
|
const anchor = new Anchor("My Content");
|
|
14
|
+
// Or
|
|
15
|
+
// const anchor = new NativeDocumentFragment("My Content");
|
|
12
16
|
|
|
13
17
|
// In the DOM, this creates:
|
|
14
18
|
// <!-- Anchor Start : My Content -->
|
|
@@ -177,7 +181,7 @@ fragment.appendChild(Div("Content"));
|
|
|
177
181
|
// Gets replaced entirely when appended to parent
|
|
178
182
|
```
|
|
179
183
|
|
|
180
|
-
**Use Anchor** for dynamic content management:
|
|
184
|
+
**Use Anchor (NativeDocumentFragment)** for dynamic content management:
|
|
181
185
|
|
|
182
186
|
```javascript
|
|
183
187
|
// Dynamic content area that can be updated multiple times
|
package/elements.js
CHANGED
package/package.json
CHANGED