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/documentation/tutorial/05-events/01-dom-events/text.md

12 lines
222 B

---
title: DOM events
---
As we've briefly seen already, you can listen to any event on an element with the `on:` directive:
```svelte
<div on:mousemove={handleMousemove}>
The mouse position is {m.x} x {m.y}
</div>
```