@pageboard/html 0.10.30 → 0.10.32
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/package.json +1 -1
- package/ui/consent.js +1 -1
- package/ui/fieldset.js +3 -2
package/package.json
CHANGED
package/ui/consent.js
CHANGED
|
@@ -48,7 +48,7 @@ class HTMLCustomConsentElement extends HTMLFormElement {
|
|
|
48
48
|
const consents = window.HTMLCustomFormElement.prototype.read.call(this);
|
|
49
49
|
const names = new Set();
|
|
50
50
|
for (const node of this.elements) {
|
|
51
|
-
if (node.name?.startsWith('consent.')) names.
|
|
51
|
+
if (node.name?.startsWith('consent.')) names.add(node.name);
|
|
52
52
|
}
|
|
53
53
|
const def = consents.consent;
|
|
54
54
|
if (def != "custom") for (const consent of names) {
|
package/ui/fieldset.js
CHANGED
|
@@ -11,14 +11,15 @@ class HTMLCustomFieldSetElement extends HTMLFieldSetElement {
|
|
|
11
11
|
#update() {
|
|
12
12
|
if (this.isContentEditable || !this.options.name) return;
|
|
13
13
|
const name = this.options.name.split(".").slice(1).join('.');
|
|
14
|
-
const
|
|
14
|
+
const vals = this.form ? window.HTMLCustomFormElement.prototype.read.call(this.form, true) : {};
|
|
15
|
+
const val = vals[name];
|
|
15
16
|
this.disabled = this.hidden = val != this.options.value;
|
|
16
17
|
}
|
|
17
|
-
|
|
18
18
|
patch() {
|
|
19
19
|
this.#update();
|
|
20
20
|
}
|
|
21
21
|
setup() {
|
|
22
|
+
this.#update();
|
|
22
23
|
this.form?.addEventListener('change', this);
|
|
23
24
|
}
|
|
24
25
|
close() {
|