From ae8bb61f6e86aba28b7f03616ba0c3cfb0622733 Mon Sep 17 00:00:00 2001 From: gioboa Date: Thu, 15 May 2025 16:00:03 +0200 Subject: [PATCH] chore: move cross-origin test page --- docs/public/cross-origin.html | 40 ----------------------- docs/src/routes/cross-origin/index.ts | 46 +++++++++++++++++++++++++++ tests/platform/iframe/index2.html | 2 +- 3 files changed, 47 insertions(+), 41 deletions(-) delete mode 100644 docs/public/cross-origin.html create mode 100644 docs/src/routes/cross-origin/index.ts diff --git a/docs/public/cross-origin.html b/docs/public/cross-origin.html deleted file mode 100644 index c22e22cd..00000000 --- a/docs/public/cross-origin.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - -
- iframe origin: - -
-
- parent origin: - -
- - - diff --git a/docs/src/routes/cross-origin/index.ts b/docs/src/routes/cross-origin/index.ts new file mode 100644 index 00000000..08175f51 --- /dev/null +++ b/docs/src/routes/cross-origin/index.ts @@ -0,0 +1,46 @@ +import { RequestHandler } from "@qwik.dev/router"; + +export const onGet: RequestHandler = async ({send}) => { + const page = ` + + + + + +
+ iframe origin: + +
+
+ parent origin: + +
+ + + `; + send(200, page); +}; \ No newline at end of file diff --git a/tests/platform/iframe/index2.html b/tests/platform/iframe/index2.html index 993a3fe3..8ae7328d 100644 --- a/tests/platform/iframe/index2.html +++ b/tests/platform/iframe/index2.html @@ -328,7 +328,7 @@

Iframe

iframe.style.height = '45px'; - const url = new URL('https://partytown.qwik.dev/cross-origin.html'); + const url = new URL('https://partytown.qwik.dev/cross-origin'); url.searchParams.set('parentorigin', window.origin); iframe.src = url.href; elm.parentNode.appendChild(iframe);