cradova 3.7.1 → 3.7.2
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/dist/index.js +6 -4
- package/dist/primitives/classes.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -218,7 +218,9 @@ var funcManager = {
|
|
|
218
218
|
recall(func) {
|
|
219
219
|
if (func.rendered) {
|
|
220
220
|
if (func.published) {
|
|
221
|
-
|
|
221
|
+
setTimeout(() => {
|
|
222
|
+
this.activate(func);
|
|
223
|
+
});
|
|
222
224
|
}
|
|
223
225
|
}
|
|
224
226
|
},
|
|
@@ -306,10 +308,10 @@ var raw = (html) => {
|
|
|
306
308
|
class cradovaEvent {
|
|
307
309
|
after_comp_is_mounted = [];
|
|
308
310
|
after_page_is_killed = [];
|
|
309
|
-
|
|
311
|
+
dispatchEvent(eventName) {
|
|
310
312
|
const eventListeners = this[eventName];
|
|
311
313
|
while (eventListeners.length !== 0) {
|
|
312
|
-
const en_cb =
|
|
314
|
+
const en_cb = eventListeners.shift()();
|
|
313
315
|
if (en_cb) {
|
|
314
316
|
this.after_page_is_killed.push(en_cb);
|
|
315
317
|
}
|
|
@@ -488,6 +490,7 @@ class Page {
|
|
|
488
490
|
async _load() {
|
|
489
491
|
if (this._name)
|
|
490
492
|
document.title = this._name;
|
|
493
|
+
CradovaEvent.dispatchEvent("after_page_is_killed");
|
|
491
494
|
this._template = div({ id: "page" }, this._html);
|
|
492
495
|
RouterBox.doc.innerHTML = "";
|
|
493
496
|
if (this._snapshot)
|
|
@@ -499,7 +502,6 @@ class Page {
|
|
|
499
502
|
left: 0,
|
|
500
503
|
behavior: "instant"
|
|
501
504
|
});
|
|
502
|
-
CradovaEvent.dispatchEvent("after_page_is_killed");
|
|
503
505
|
if (this._snapshot)
|
|
504
506
|
this._takeSnapShot();
|
|
505
507
|
}
|
|
@@ -19,7 +19,7 @@ export declare class cradovaEvent {
|
|
|
19
19
|
* Dispatch any event
|
|
20
20
|
* @param eventName
|
|
21
21
|
*/
|
|
22
|
-
dispatchEvent(eventName: "after_comp_is_mounted" | "after_page_is_killed"):
|
|
22
|
+
dispatchEvent(eventName: "after_comp_is_mounted" | "after_page_is_killed"): void;
|
|
23
23
|
}
|
|
24
24
|
export declare const CradovaEvent: cradovaEvent;
|
|
25
25
|
/**
|