Skip to content

Commit

Permalink
Merge pull request #19090 from maxhq/beta
Browse files Browse the repository at this point in the history
 [DOC] Fix hint about event handler argument order
  • Loading branch information
rwjblue committed Aug 19, 2020
2 parents c4b0057 + befd174 commit eced961
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/@ember/-internals/glimmer/lib/modifiers/on.ts
Expand Up @@ -291,8 +291,10 @@ function addEventListener(
<button {{on 'click' (fn this.saveLike @post)}}>Like this post!</button>
```
In this case, the `saveLike` function will receive two arguments: the click event
and the value of `@post`.
In this case, the `saveLike` function will receive two arguments: the value
of `@post` and the click event. The click event will always be the last
argument passed to the handler because `{{fn}}` injects custom arguments
first.
### Function Context
Expand Down

0 comments on commit eced961

Please sign in to comment.