mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
Add link to Mozilla docs about events bubbling and capture phase
Fixes #2393
This commit is contained in:
parent
ade0bc870a
commit
c474007c88
@ -21,7 +21,7 @@ The full list of modifiers:
|
|||||||
* `preventDefault` — calls `event.preventDefault()` before running the handler. Useful for e.g. client-side form handling
|
* `preventDefault` — calls `event.preventDefault()` before running the handler. Useful for e.g. client-side form handling
|
||||||
* `stopPropagation` — calls `event.stopPropagation()`, preventing the event reaching the next element
|
* `stopPropagation` — calls `event.stopPropagation()`, preventing the event reaching the next element
|
||||||
* `passive` — improves scrolling performance on touch/wheel events (Svelte will add it automatically where it's safe to do so)
|
* `passive` — improves scrolling performance on touch/wheel events (Svelte will add it automatically where it's safe to do so)
|
||||||
* `capture` — fires the handler during the *capture* phase instead of the *bubbling* phase
|
* `capture` — fires the handler during the *capture* phase instead of the *bubbling* phase ([MDN docs](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture))
|
||||||
* `once` — remove the handler after the first time it runs
|
* `once` — remove the handler after the first time it runs
|
||||||
|
|
||||||
You can chain modifiers together, e.g. `on:click|once|capture={...}`.
|
You can chain modifiers together, e.g. `on:click|once|capture={...}`.
|
Loading…
Reference in New Issue
Block a user