From c7a195ac6d53867e6f5fb8824f47964ad2ac1fd5 Mon Sep 17 00:00:00 2001 From: Simon H <5968653+dummdidumm@users.noreply.github.com> Date: Tue, 9 Jan 2024 14:49:41 +0100 Subject: [PATCH] docs: note embedded mode limitations (#11555) related #11545 --- packages/kit/src/exports/public.d.ts | 1 + packages/kit/types/index.d.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/kit/src/exports/public.d.ts b/packages/kit/src/exports/public.d.ts index 7bebe036fd09..caf0113680a1 100644 --- a/packages/kit/src/exports/public.d.ts +++ b/packages/kit/src/exports/public.d.ts @@ -349,6 +349,7 @@ export interface KitConfig { }; /** * Whether or not the app is embedded inside a larger app. If `true`, SvelteKit will add its event listeners related to navigation etc on the parent of `%sveltekit.body%` instead of `window`, and will pass `params` from the server rather than inferring them from `location.pathname`. + * Note that it is generally not supported to embed multiple SvelteKit apps on the same page and use client-side SvelteKit features within them (things such as pushing to the history state assume a single instance). * @default false */ embedded?: boolean; diff --git a/packages/kit/types/index.d.ts b/packages/kit/types/index.d.ts index eb40e35c3dad..8a5b2d1c071f 100644 --- a/packages/kit/types/index.d.ts +++ b/packages/kit/types/index.d.ts @@ -331,6 +331,7 @@ declare module '@sveltejs/kit' { }; /** * Whether or not the app is embedded inside a larger app. If `true`, SvelteKit will add its event listeners related to navigation etc on the parent of `%sveltekit.body%` instead of `window`, and will pass `params` from the server rather than inferring them from `location.pathname`. + * Note that it is generally not supported to embed multiple SvelteKit apps on the same page and use client-side SvelteKit features within them (things such as pushing to the history state assume a single instance). * @default false */ embedded?: boolean;