From e40276d1afe0f757f13d250e0a4798914882865b Mon Sep 17 00:00:00 2001 From: Florent Benoit Date: Mon, 21 Oct 2024 09:24:26 +0200 Subject: [PATCH 1/2] fix: webview can contain any string for preload fixes https://github.com/sveltejs/svelte/issues/13661 Signed-off-by: Florent Benoit --- .changeset/nasty-guests-hammer.md | 5 +++++ packages/svelte/elements.d.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/nasty-guests-hammer.md diff --git a/.changeset/nasty-guests-hammer.md b/.changeset/nasty-guests-hammer.md new file mode 100644 index 000000000000..c6fa9cf6140f --- /dev/null +++ b/.changeset/nasty-guests-hammer.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +fix: webview preload tag can be any string diff --git a/packages/svelte/elements.d.ts b/packages/svelte/elements.d.ts index 8db6648c82f7..08abab344d70 100644 --- a/packages/svelte/elements.d.ts +++ b/packages/svelte/elements.d.ts @@ -1805,7 +1805,7 @@ export interface HTMLWebViewAttributes extends HTMLAttributes { nodeintegration?: boolean | undefined | null; partition?: string | undefined | null; plugins?: boolean | undefined | null; - preload?: 'auto' | 'none' | 'metadata' | '' | undefined | null; + preload?: string | undefined | null; src?: string | undefined | null; useragent?: string | undefined | null; webpreferences?: string | undefined | null; From b2b97d4326438f97ac93483f37991a3e1fbae4b6 Mon Sep 17 00:00:00 2001 From: Simon H <5968653+dummdidumm@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:14:34 +0200 Subject: [PATCH 2/2] Update packages/svelte/elements.d.ts --- packages/svelte/elements.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/svelte/elements.d.ts b/packages/svelte/elements.d.ts index 08abab344d70..8746b29e250a 100644 --- a/packages/svelte/elements.d.ts +++ b/packages/svelte/elements.d.ts @@ -1805,7 +1805,7 @@ export interface HTMLWebViewAttributes extends HTMLAttributes { nodeintegration?: boolean | undefined | null; partition?: string | undefined | null; plugins?: boolean | undefined | null; - preload?: string | undefined | null; + preload?: string | undefined | null; // in the DOM it's only 'auto' | 'none' | 'metadata' | '', but electron allows arbitrary values src?: string | undefined | null; useragent?: string | undefined | null; webpreferences?: string | undefined | null;