@tokenoftrust/storefront-runner 4.1.0 → 4.1.1
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.
|
@@ -89,11 +89,13 @@ export function lazyCheckoutLoaderJs(options: LazyCheckoutLoaderOptions): string
|
|
|
89
89
|
if (!url) return false;
|
|
90
90
|
try { return new URL(url, document.baseURI).origin === cartOrigin; } catch (e) { return false; }
|
|
91
91
|
}
|
|
92
|
-
// Foxy copies the Referer onto cart_cancel_and_continue_link and a
|
|
93
|
-
//
|
|
94
|
-
//
|
|
95
|
-
//
|
|
96
|
-
//
|
|
92
|
+
// Foxy copies the Referer onto cart_cancel_and_continue_link and ignores a
|
|
93
|
+
// continue parameter. The document policy stays strict-origin. A cart script
|
|
94
|
+
// snapshots the Referer while its src is assigned, so that assignment uses the
|
|
95
|
+
// store-home URL and restores the page before the turn ends. A cart navigation
|
|
96
|
+
// sends the full document URL through the element's referrerPolicy. That URL
|
|
97
|
+
// already includes the store origin and tenant path, and the history entry
|
|
98
|
+
// stays the page that opened the cart.
|
|
97
99
|
function storeHome() {
|
|
98
100
|
return location.origin + cookiePath;
|
|
99
101
|
}
|
|
@@ -252,7 +254,6 @@ export function lazyCheckoutLoaderJs(options: LazyCheckoutLoaderOptions): string
|
|
|
252
254
|
anchor.referrerPolicy = referrerPolicy;
|
|
253
255
|
if (state === 'ready') {
|
|
254
256
|
stampAnchor(anchor);
|
|
255
|
-
if (!event.defaultPrevented) revealStoreHome();
|
|
256
257
|
return;
|
|
257
258
|
}
|
|
258
259
|
if (event.defaultPrevented) return;
|
|
@@ -313,7 +314,6 @@ export function lazyCheckoutLoaderJs(options: LazyCheckoutLoaderOptions): string
|
|
|
313
314
|
if (!cartForm || state === 'ready') {
|
|
314
315
|
if (!event.defaultPrevented && state === 'ready') {
|
|
315
316
|
form.referrerPolicy = referrerPolicy;
|
|
316
|
-
revealStoreHome();
|
|
317
317
|
}
|
|
318
318
|
return;
|
|
319
319
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenoftrust/storefront-runner",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"description": "World-shareable storefront runner: multi-tenant renderer on Astro/Cloudflare. No control plane.",
|
|
6
6
|
"packageManager": "pnpm@11.9.0",
|