mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 09:21:21 +01:00
added self
modifier explanation to the docs
This commit is contained in:
parent
7342d484f1
commit
b6679eba7a
@ -23,5 +23,6 @@ The full list of modifiers:
|
||||
* `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 ([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
|
||||
* `self` — only trigger handler if event.target is the element itself
|
||||
|
||||
You can chain modifiers together, e.g. `on:click|once|capture={...}`.
|
||||
|
Loading…
Reference in New Issue
Block a user