mirror of https://github.com/sveltejs/svelte
ensure binding event handlers precede normal ones (fixes #486)
parent
cc21db37c3
commit
ef52a93699
@ -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