@asamuzakjp/dom-selector 4.6.0-b.1 → 4.6.0
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/README.md +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -171,14 +171,15 @@ Returns **[Array][62]<([object][60] \| [undefined][63])>** array of matched n
|
|
|
171
171
|
|E:state(v)|✓|*1|
|
|
172
172
|
|E:host(:state(v))|✓|*1|
|
|
173
173
|
|
|
174
|
-
*1: `ElementInternals.states` is not implemented in jsdom, so you need to
|
|
174
|
+
*1: `ElementInternals.states`, i.e. `CustomStateSet`, is not implemented in jsdom, so you need to patch yourself.
|
|
175
|
+
|
|
175
176
|
``` javascript
|
|
176
177
|
class LabeledCheckbox extends window.HTMLElement {
|
|
177
178
|
#internals;
|
|
178
179
|
constructor() {
|
|
179
180
|
super();
|
|
180
181
|
this.#internals = this.attachInternals();
|
|
181
|
-
//
|
|
182
|
+
// patch CustomStateSet
|
|
182
183
|
if (!this.#internals.states) {
|
|
183
184
|
this.#internals.states = new Set();
|
|
184
185
|
}
|
package/package.json
CHANGED