mirror of https://github.com/sveltejs/svelte
dont lump in bind:this with everything else - fixes #1908
parent
eefe120e70
commit
f16e4d3bdd
@ -0,0 +1,24 @@
|
||||
export default {
|
||||
html: `
|
||||
<input>
|
||||
<p>value: initial</p>
|
||||
`,
|
||||
|
||||
ssrHtml: `
|
||||
<input value="initial">
|
||||
<p>value: initial</p>
|
||||
`,
|
||||
|
||||
async test({ assert, target, window }) {
|
||||
const input = target.querySelector('input');
|
||||
const event = new window.Event('input');
|
||||
|
||||
input.value = 'changed';
|
||||
await input.dispatchEvent(event);
|
||||
|
||||
assert.htmlEqual(target.innerHTML, `
|
||||
<input>
|
||||
<p>value: changed</p>
|
||||
`);
|
||||
}
|
||||
};
|
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
let node;
|
||||
export let value = 'initial';
|
||||
</script>
|
||||
|
||||
<input bind:this={node} bind:value>
|
||||
<p>value: {value}</p>
|
Loading…
Reference in new issue