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/$$slots/Child.svelte

16 lines
257 B

<script>
let target;
const slot = $$slots.default();
$: {
if (target) {
slot.content[0].setAttribute('attr', 'value');
slot.content[2].$set({ prop: 'bar' })
slot.mount(target);
}
}
</script>
<div bind:this={target} />