-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
There were some interop limitations between slots & snippets which by now have been addressed for the most part, so this probably should be fixed as well, if possible.
Would obsolete #13063 since everything would be fully compatible as far as I can tell.
Reproduction
<h2>WithSnippet - Fragments</h2>
<WithSnippet>
<svelte:fragment>
Fragment content
</svelte:fragment>
<svelte:fragment slot="stuff">
Fragment content
</svelte:fragment>
</WithSnippet>
<h2>WithSnippet - Elements</h2>
<WithSnippet>
<span>Element content</span>
<span slot="stuff">
Element content
</span>
</WithSnippet><!-- WithSnippet.svelte -->
<script>
const { stuff, children } = $props();
</script>
{#if children}
<p>Default: {@render children()}</p>
{:else}
<p style:color=red>Default slot snippet is undefined</p>
{/if}
{#if stuff}
<p>Named: {@render stuff()}</p>
{:else}
<p style:color=red>Named slot snippet is undefined</p>
{/if}Logs
No response
System Info
REPLSeverity
blocking an upgrade
Metadata
Metadata
Assignees
Labels
No labels