You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: API.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@
4
4
5
5
| Method | Description |
6
6
| :--- | :--- |
7
-
|`add(Class, Object)`| Register a class as a new custom-tag and provide options for it. |
7
+
|`add(Class)`| Register a class as a new custom-tag and provide options for it. |
8
+
|`init(root?)`| Initialize all components (optionally starating at a root node in the DOM). This is called automatically when an <App></App> component is added. |
8
9
|`escape(String)`| Escapes HTML characters from a string (based on [he][3]). |
9
10
|`sanitize(Object)`| Escapes all the strings found in an object literal. |
10
11
|`match(Node, Selector)`| Match the given node against a selector or any matching parent of the given node. This is useful when trying to locate a node from the actual node that was interacted with. |
@@ -31,7 +32,7 @@
31
32
32
33
| Method | Description |
33
34
| :--- | :--- |
34
-
|`constructor(props)`| An instance of the element is created or upgraded. Useful for initializing state, setting up event listeners, or creating shadow dom. See the spec for restrictions on what you can do in the constructor. A constructor will receive an argument of `props` and must call `super(props)`. |
35
+
|`constructor(object)`| An instance of the element is created or upgraded. Useful for initializing state, setting up event listeners, or creating shadow dom. See the spec for restrictions on what you can do in the constructor. The constructor's arguments must be forwarded by calling `super(object)`. |
35
36
|`willConnect()`| Called prior to the element being inserted into the DOM. Useful for updating configuration, state and preparing for the render. |
36
37
|`connected()`| Called every time the element is inserted into the DOM. Useful for running setup code, such as fetching resources or rendering. Generally, you should try to delay work until this time. |
37
38
|`disconnected()`| Called every time the element is removed from the DOM. Useful for running clean up code. |
0 commit comments