diff --git a/documentation/docs/99-legacy/10-legacy-on.md b/documentation/docs/99-legacy/10-legacy-on.md index 9584a9aa70..f2ee694cc1 100644 --- a/documentation/docs/99-legacy/10-legacy-on.md +++ b/documentation/docs/99-legacy/10-legacy-on.md @@ -2,17 +2,9 @@ title: on: --- -```svelte - -on:eventname={handler} -``` - -```svelte - -on:eventname|modifiers={handler} -``` +In runes mode, event handlers are just like any other attribute or prop. -Use the `on:` directive to listen to DOM events. +In legacy mode, we use the `on:` directive: ```svelte @@ -30,7 +22,7 @@ Use the `on:` directive to listen to DOM events. ``` -Handlers can be declared inline with no performance penalty. As with attributes, directive values may be quoted for the sake of syntax highlighters. +Handlers can be declared inline with no performance penalty: ```svelte ``` -Add _modifiers_ to DOM events with the `|` character. +Add _modifiers_ to element event handlers with the `|` character. ```svelte