diff --git a/site/content/tutorial/05-events/01-dom-events/text.md b/site/content/tutorial/05-events/01-dom-events/text.md index 1c08c9159a..b8e3b9fef9 100644 --- a/site/content/tutorial/05-events/01-dom-events/text.md +++ b/site/content/tutorial/05-events/01-dom-events/text.md @@ -8,4 +8,20 @@ As we've briefly seen already, you can listen to any event on an element with th
The mouse position is {m.x} x {m.y}
-``` \ No newline at end of file +``` + +> The `on:` directive expects a function reference in the curly braces. *Not a function call as it was in version 2*. +> When the event is triggered the function will be called with the `event` object as the first parameter. +> So if you need to pass a value with the event then you need to make a function that returns a function with your parameter enclosed. Here is an example: +```html + +... + +```