From 946571215ef557d812db23bceb3c4412f7d80ce9 Mon Sep 17 00:00:00 2001 From: Samuel Elgozi Date: Thu, 8 Aug 2019 10:49:28 +0300 Subject: [PATCH] added `self` modifier explanation to the docs --- site/content/tutorial/05-events/03-event-modifiers/text.md | 1 + 1 file changed, 1 insertion(+) diff --git a/site/content/tutorial/05-events/03-event-modifiers/text.md b/site/content/tutorial/05-events/03-event-modifiers/text.md index 73386dd096..41154cafcd 100644 --- a/site/content/tutorial/05-events/03-event-modifiers/text.md +++ b/site/content/tutorial/05-events/03-event-modifiers/text.md @@ -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={...}`.