tagu-tagu 3.3.0 → 3.3.2

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.
Files changed (2) hide show
  1. package/README.md +15 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -149,6 +149,20 @@ function OnExample() {
149
149
  document.body.appendChild(OnExample());
150
150
  ```
151
151
 
152
+ #### `data` initializer
153
+ [JSFiddle](https://jsfiddle.net/do_the_simplest/9cLtyzkm/1/)
154
+
155
+ ```typescript
156
+ import { div, waitForData } from "tagu-tagu";
157
+
158
+ function DataExample() {
159
+ return div({ data: { "my-data-key": "Hello World!" } });
160
+ }
161
+
162
+ const element = DataExample();
163
+ console.log(await waitForData(element, "my-data-key")); // Hello World!
164
+ ```
165
+
152
166
  #### Modify existing element
153
167
  You can use initializers for existing element.
154
168
  [JSFiddle](https://jsfiddle.net/do_the_simplest/o87nw6zL/15/)
@@ -170,6 +184,7 @@ Modify(document.body, {
170
184
 
171
185
  ```
172
186
 
187
+
173
188
  #### `$` initializer
174
189
  [JSFiddle](https://jsfiddle.net/do_the_simplest/b8roj7wx/1/)
175
190
  ```html
@@ -271,7 +286,6 @@ function InitializerCallbackExample() {
271
286
 
272
287
  document.body.appendChild(InitializerCallbackExample());
273
288
  ```
274
-
275
289
  ### `If`
276
290
  [JSFiddle](https://jsfiddle.net/do_the_simplest/bxuqsh1d/19/)
277
291
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tagu-tagu",
3
- "version": "3.3.0",
3
+ "version": "3.3.2",
4
4
  "description": "A lightweight helper for vanilla `HTMLElement`, with reactivity.",
5
5
  "keywords": [
6
6
  "front-end",