diff --git a/site/content/docs/02-template-syntax.md b/site/content/docs/02-template-syntax.md index 5b8a22f9bf..881d1c19a6 100644 --- a/site/content/docs/02-template-syntax.md +++ b/site/content/docs/02-template-syntax.md @@ -366,6 +366,23 @@ Components can emit events using [createEventDispatcher](docs#createEventDispatc ``` +It's also possible to have two different listeners that react on the same event: + +```html + + + +```html + --- As with DOM events, if the `on:` directive is used without a value, the component will *forward* the event, meaning that a consumer of the component can listen for it. @@ -1307,4 +1324,4 @@ It accepts a comma-separated list of variable names (not arbitrary expressions). {@debug typeof user === 'object'} ``` -The `{@debug}` tag without any arguments will insert a `debugger` statement that gets triggered when *any* state changes, as opposed to the specified variables. \ No newline at end of file +The `{@debug}` tag without any arguments will insert a `debugger` statement that gets triggered when *any* state changes, as opposed to the specified variables.