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

11 lines
219 B

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