@webqit/webflo 1.0.5 → 1.0.7
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
|
@@ -47,6 +47,10 @@ export class WebfloClient extends WebfloRuntime {
|
|
|
47
47
|
#backgroundMessaging;
|
|
48
48
|
get backgroundMessaging() { return this.#backgroundMessaging; }
|
|
49
49
|
|
|
50
|
+
get withViewTransitions() {
|
|
51
|
+
return document.querySelector('meta[name="webflo-viewtransitions"]')?.value;
|
|
52
|
+
}
|
|
53
|
+
|
|
50
54
|
constructor(host) {
|
|
51
55
|
super();
|
|
52
56
|
this.#host = host;
|
|
@@ -486,7 +490,7 @@ export class WebfloClient extends WebfloRuntime {
|
|
|
486
490
|
}
|
|
487
491
|
|
|
488
492
|
async transitionUI(updateCallback) {
|
|
489
|
-
if (document.startViewTransition) {
|
|
493
|
+
if (document.startViewTransition && this.withViewTransitions) {
|
|
490
494
|
const synthesizeWhile = window.webqit?.realdom?.synthesizeWhile || ((callback) => callback());
|
|
491
495
|
await synthesizeWhile(async () => {
|
|
492
496
|
Observer.set(this.transition, 'phase', 1);
|
|
@@ -72,6 +72,8 @@ export class WebfloSubClient extends WebfloClient {
|
|
|
72
72
|
|
|
73
73
|
get workport() { return this.#superRuntime.workport; }
|
|
74
74
|
|
|
75
|
+
get withViewTransitions() { return this.host.has('viewtransitions'); }
|
|
76
|
+
|
|
75
77
|
constructor(host, superRuntime) {
|
|
76
78
|
if (!(host instanceof HTMLElement)) {
|
|
77
79
|
throw new Error('Argument #1 must be a HTMLElement instance');
|
package/src/runtime-pi/xfetch.js
CHANGED
|
@@ -8,6 +8,7 @@ import { renderHttpMessageInit } from './util-http.js';
|
|
|
8
8
|
* The xfetch Mixin
|
|
9
9
|
*/
|
|
10
10
|
const xfetch = async (url, init = {}) => {
|
|
11
|
+
return await fetch(url);
|
|
11
12
|
if (init.body) {
|
|
12
13
|
const { body, headers } = renderHttpMessageInit(init);
|
|
13
14
|
init = { ...init, body, headers, };
|