docs: multiple event listeners on single node (#2825)

pull/7738/head
Emanuele 6 years ago committed by Conduitry
parent 20785ab8f3
commit 64e048b290

@ -351,6 +351,24 @@ If the `on:` directive is used without a value, the component will *forward* the
</button>
```
---
It's possible to have multiple event listeners for the same event:
```html
<script>
let counter = 0;
function increment() {
counter = counter + 1;
}
function track(event) {
trackEvent(event)
}
</script>
<button on:click={increment} on:click={track}>Click me!</button>
```
### Component events

Loading…
Cancel
Save