@pageboard/html 0.16.11 → 0.16.13
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 +3 -2
package/package.json
CHANGED
package/ui/consent.js
CHANGED
|
@@ -46,7 +46,8 @@ class HTMLElementConsent extends Page.create(HTMLFormElement) {
|
|
|
46
46
|
const list = Array.from(this.constructor.explicits);
|
|
47
47
|
const def = consents.consent;
|
|
48
48
|
for (const consent of list) {
|
|
49
|
-
if (def != "custom") consents[consent] = def;
|
|
49
|
+
if (def && def != "custom") consents[consent] = def;
|
|
50
|
+
else consents[consent] ??= null;
|
|
50
51
|
}
|
|
51
52
|
if (list.some(c => consents[c] == null)) {
|
|
52
53
|
// not all explicit consents have been answered
|
|
@@ -75,7 +76,7 @@ Page.constructor.prototype.consents = function (name, val) {
|
|
|
75
76
|
const { storage } = this.scope;
|
|
76
77
|
const key = "consent." + name;
|
|
77
78
|
if (val === null) {
|
|
78
|
-
storage.
|
|
79
|
+
storage.del(key);
|
|
79
80
|
} else if (val !== undefined) {
|
|
80
81
|
storage.set(key, val ? "yes" : "no");
|
|
81
82
|
} else {
|