You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/dynamic-element-void-with-c.../main.svelte

11 lines
228 B

<script>
const tags = [{ t: 'div', content: 'hello world' }, { t: 'input' }];
</script>
{#each tags as tag}
{tag.t} <br />
<svelte:element this={tag.t}>
{#if tag.t !== 'input'}{tag.content}{/if}
</svelte:element>
{/each}