mirror of https://github.com/sveltejs/svelte
Merge pull request #487 from sveltejs/gh-486
ensure binding event handlers precede normal onespull/488/head
commit
4f20ac8710
@ -0,0 +1,20 @@
|
||||
export default {
|
||||
data: {
|
||||
a: 42
|
||||
},
|
||||
|
||||
test ( assert, component, target, window ) {
|
||||
const input = target.querySelector( 'input' );
|
||||
assert.equal( input.value, '42' );
|
||||
|
||||
const event = new window.Event( 'input' );
|
||||
|
||||
input.value = 43;
|
||||
input.dispatchEvent( event );
|
||||
|
||||
assert.equal( input.value, '43' );
|
||||
assert.equal( component.get( 'a' ), 43 );
|
||||
|
||||
component.destroy();
|
||||
}
|
||||
};
|
@ -0,0 +1 @@
|
||||
<input bind:value='a' on:input='set({ b: 0 })'>
|
Loading…
Reference in new issue