mirror of https://github.com/sveltejs/svelte
Merge pull request #1910 from sveltejs/gh-1908
don't lump in `bind:this` with everything elsepull/1913/head
commit
35f57c0212
@ -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