-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ensure binding event handlers precede normal ones (fixes #486)
- Loading branch information
1 parent
cc21db3
commit ef52a93
Showing
3 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<input bind:value='a' on:input='set({ b: 0 })'> |