@webqit/webflo 1.0.8 → 1.0.10
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
CHANGED
|
@@ -91,7 +91,9 @@ export class WebfloSubClient extends WebfloClient {
|
|
|
91
91
|
}
|
|
92
92
|
const uncontrols = super.initialize();
|
|
93
93
|
this.backgroundMessaging.setParent(this.#superRuntime.backgroundMessaging);
|
|
94
|
-
this.
|
|
94
|
+
if (this.host.getAttribute('location')) {
|
|
95
|
+
this.navigate(this.location.href);
|
|
96
|
+
}
|
|
95
97
|
return () => {
|
|
96
98
|
if (this.backgroundMessaging.parentNode === this.#superRuntime.backgroundMessaging) {
|
|
97
99
|
this.backgroundMessaging.setParent(null);
|
|
@@ -656,6 +656,13 @@ export class WebfloServer extends WebfloRuntime {
|
|
|
656
656
|
if (document.readyState === 'complete') return res();
|
|
657
657
|
document.addEventListener('load', res);
|
|
658
658
|
});
|
|
659
|
+
// Await rendering engine
|
|
660
|
+
if (window.webqit.$qCompilerImport) {
|
|
661
|
+
await new Promise(res => {
|
|
662
|
+
window.webqit.$qCompilerImport.then(res);
|
|
663
|
+
setTimeout(res, 300);
|
|
664
|
+
});
|
|
665
|
+
}
|
|
659
666
|
if (window.webqit?.oohtml?.configs) {
|
|
660
667
|
const {
|
|
661
668
|
BINDINGS_API: { api: bindingsConfig } = {},
|
|
@@ -681,6 +688,7 @@ export class WebfloServer extends WebfloRuntime {
|
|
|
681
688
|
const newRoute = '/' + `routes/${httpEvent.url.pathname}`.split('/').map(a => (a => a.startsWith('$') ? '-' : a)(a.trim())).filter(a => a).join('/');
|
|
682
689
|
document.body.setAttribute(modulesContextAttrs.importscontext, newRoute);
|
|
683
690
|
}
|
|
691
|
+
await new Promise(res => setTimeout(res, 500));
|
|
684
692
|
}
|
|
685
693
|
// Append background-activity meta
|
|
686
694
|
let backgroundActivityMeta = document.querySelector('meta[name="X-Background-Messaging"]');
|
|
@@ -700,15 +708,7 @@ export class WebfloServer extends WebfloRuntime {
|
|
|
700
708
|
hydrationData.setAttribute('rel', 'hydration');
|
|
701
709
|
hydrationData.textContent = JSON.stringify(data);
|
|
702
710
|
document.body.append(hydrationData);
|
|
703
|
-
|
|
704
|
-
if (window.webqit.$qCompilerImport) {
|
|
705
|
-
await new Promise(res => {
|
|
706
|
-
window.webqit.$qCompilerImport.then(res);
|
|
707
|
-
setTimeout(res, 300);
|
|
708
|
-
});
|
|
709
|
-
}
|
|
710
|
-
await new Promise(res => setTimeout(res, 50));
|
|
711
|
-
return window;
|
|
711
|
+
return window;
|
|
712
712
|
});
|
|
713
713
|
// Validate rendering
|
|
714
714
|
if (typeof scope.rendering !== 'string' && !(typeof scope.rendering?.toString === 'function')) {
|