Skip to content

Commit

Permalink
link directly to event modifier tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jul 26, 2019
1 parent 9a0a2e2 commit 729fc4e
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,5 @@ On line 33, add the `keydown` listener:
```html
<svelte:window on:keydown={handleKeydown}/>
```
Don't forget to add `preventDefault` modifier if you want to press any other key, e.g. after you have pressed `Tab` or `Ctrl + D`:

```html
<svelte:window on:keydown|preventDefault={handleKeydown}/>
```
> As with DOM elements, you can add [event modifiers](tutorial/event-modifiers) like `preventDefault`.

0 comments on commit 729fc4e

Please sign in to comment.