@pageboard/html 0.14.13 → 0.14.14
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/elements/image.js +1 -1
- package/package.json +1 -1
- package/ui/consent.js +8 -6
package/elements/image.js
CHANGED
package/package.json
CHANGED
package/ui/consent.js
CHANGED
|
@@ -38,7 +38,7 @@ class HTMLElementConsent extends Page.create(HTMLFormElement) {
|
|
|
38
38
|
}
|
|
39
39
|
state.scope.storage.set('consent', consent);
|
|
40
40
|
state.scope.$consent = consent;
|
|
41
|
-
state.runChain('consent');
|
|
41
|
+
state.copy().runChain('consent');
|
|
42
42
|
}
|
|
43
43
|
handleChange(e, state) {
|
|
44
44
|
this.handleSubmit(e, state);
|
|
@@ -59,10 +59,6 @@ class HTMLElementConsent extends Page.create(HTMLFormElement) {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
Page.define(`element-consent`, HTMLElementConsent, 'form');
|
|
64
|
-
|
|
65
|
-
|
|
66
62
|
Page.constructor.prototype.consent = function (fn) {
|
|
67
63
|
const initial = this.scope.$consent === undefined;
|
|
68
64
|
let consent = this.scope.storage.get('consent');
|
|
@@ -90,12 +86,18 @@ Page.constructor.prototype.reconsent = function (fn) {
|
|
|
90
86
|
return asking;
|
|
91
87
|
};
|
|
92
88
|
|
|
89
|
+
Page.define(`element-consent`, HTMLElementConsent, 'form');
|
|
90
|
+
|
|
91
|
+
|
|
93
92
|
Page.paint(state => {
|
|
94
93
|
state.finish(() => {
|
|
95
94
|
let run = true;
|
|
96
95
|
if (HTMLElementConsent.waiting) {
|
|
97
96
|
if (state.reconsent()) run = false;
|
|
98
97
|
}
|
|
99
|
-
if (run)
|
|
98
|
+
if (run) {
|
|
99
|
+
// do not change current state stage
|
|
100
|
+
state.copy().runChain('consent');
|
|
101
|
+
}
|
|
100
102
|
});
|
|
101
103
|
});
|