You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/site/content/tutorial/05-events/06-dom-event-forwarding/text.md

13 lines
294 B

---
title: DOM event forwarding
---
Event forwarding works for DOM events too.
We want to get notified of clicks on our `<FancyButton>` — to do that, we just need to forward `click` events on the `<button>` element in `FancyButton.svelte`:
```html
<button on:click>
Click me
</button>
```