thunderous 0.2.2 → 0.2.3

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 +14 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -91,10 +91,20 @@ You can always define the internals the same as you usually would, and if for so
91
91
 
92
92
  <!-- prettier-ignore-start -->
93
93
  ```ts
94
- const MyElement = customElement(({ internals, elementRef, root }) => {
95
- internals.ariaRequired = 'true';
96
- const childLink = elementRef.querySelector('a[href]'); // light DOM
97
- const innerLink = root.querySelector('a[href]'); // shadow DOM
94
+ const MyElement = customElement((params) => {
95
+ const {
96
+ internals,
97
+ elementRef,
98
+ root,
99
+ connectedCallback,
100
+ } = params;
101
+
102
+ internals.setFormValue('hello world');
103
+ connectedCallback(() => {
104
+ const childLink = elementRef.querySelector('a[href]'); // light DOM
105
+ const innerLink = root.querySelector('a[href]'); // shadow DOM
106
+ /* ... */
107
+ });
98
108
  /* ... */
99
109
  }, { formAssociated: true });
100
110
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thunderous",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",