Merge pull request #487 from sveltejs/gh-486

ensure binding event handlers precede normal ones
pull/488/head
Rich Harris 8 years ago committed by GitHub
commit 4f20ac8710

@ -13,8 +13,8 @@ const meta = {
const order = {
Attribute: 1,
EventHandler: 2,
Binding: 3,
Binding: 2,
EventHandler: 3,
Ref: 4
};

@ -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…
Cancel
Save