docs: multiple event listeners on single node ()

pull/2808/head
Emanuele 6 years ago committed by Conduitry
parent 1e919113c1
commit 394a166a41

@ -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