@zcomponent/html 2.0.0-alpha.4 → 2.0.0-alpha.5

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/package.json +2 -1
  2. package/prompt.md +18 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zcomponent/html",
3
- "version": "2.0.0-alpha.4",
3
+ "version": "2.0.0-alpha.5",
4
4
  "description": "Mattercraft support for HTML",
5
5
  "author": "Zappar Limited",
6
6
  "license": "Proprietary",
@@ -32,6 +32,7 @@
32
32
  "files": [
33
33
  "index.js",
34
34
  "index.d.ts",
35
+ "prompt.md",
35
36
  "lib/**/*",
36
37
  "public/**/*"
37
38
  ],
package/prompt.md ADDED
@@ -0,0 +1,18 @@
1
+ # @zcomponent/html
2
+
3
+ ## Hooks
4
+
5
+ The following hook functions return events:
6
+
7
+ `useOnNodeConstructed(mgr: ContextManager)` returns an event when DOM node is constructed
8
+ `useOnNodeDisposed(mgr: ContextManager)` returns an event when DOM node is disposed
9
+
10
+ ```ts
11
+ import { zRegister } from '@zcomponent/core';
12
+ import { HTMLContext } from '@zcomponent/html/context';
13
+
14
+ @zRegister(HTMLContext, 'onNodeConstructed')
15
+ private _handleNodeConstructed(node: Node) {
16
+ // A DOM node has been created
17
+ }
18
+ ```