mirror of https://github.com/sveltejs/svelte
parent
2048f5dae0
commit
acc7bb3f7f
@ -0,0 +1,11 @@
|
||||
<script>
|
||||
let { children } = $props();
|
||||
|
||||
let inited = $state(false);
|
||||
|
||||
$effect(() => {
|
||||
inited = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<span>{@render children()}</span>
|
@ -0,0 +1,12 @@
|
||||
import { flushSync } from 'svelte';
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
async test({ assert, target }) {
|
||||
const [button] = target.querySelectorAll('button');
|
||||
|
||||
assert.doesNotThrow(() => {
|
||||
flushSync(() => button.click());
|
||||
});
|
||||
}
|
||||
});
|
@ -0,0 +1,15 @@
|
||||
<script>
|
||||
import Child from './Child.svelte';
|
||||
|
||||
let show = $state(false);
|
||||
</script>
|
||||
|
||||
<button onclick={() => show = !show}>
|
||||
toggle
|
||||
</button>
|
||||
|
||||
{#if show}
|
||||
{#each { length: 1234 } as i}
|
||||
<Child>{i}</Child>
|
||||
{/each}
|
||||
{/if}
|
Loading…
Reference in new issue