mirror of https://github.com/sveltejs/svelte
fix: improve template text node serialization (#9722)
fix: improve template text node serializationpull/9707/head
parent
7eba35b9d1
commit
2fa06447cf
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: improve template text node serialization
|
@ -0,0 +1,15 @@
|
||||
import { flushSync } from 'svelte';
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
async test({ assert, target, component }) {
|
||||
const [b1] = target.querySelectorAll('button');
|
||||
|
||||
flushSync(() => {
|
||||
b1?.click();
|
||||
});
|
||||
|
||||
await Promise.resolve();
|
||||
assert.deepEqual(component.log, ['onclick']);
|
||||
}
|
||||
});
|
@ -0,0 +1,10 @@
|
||||
<script>
|
||||
const {log = []} = $props();
|
||||
|
||||
function send() {
|
||||
log.push("onclick")
|
||||
}
|
||||
</script>
|
||||
|
||||
{undefined}<hr/>
|
||||
<button onclick={send}>Send Event</button>
|
Loading…
Reference in new issue