diff --git a/2-ui/2-events/04-default-browser-action/article.md b/2-ui/2-events/04-default-browser-action/article.md index 0472a818..652253e1 100644 --- a/2-ui/2-events/04-default-browser-action/article.md +++ b/2-ui/2-events/04-default-browser-action/article.md @@ -201,7 +201,6 @@ The object will catch any right-click, look through stored handlers and run the But then each piece of code that wants a context menu should know about that object and use its help instead of the own `contextmenu` handler. ``` - ## Summary There are many default browser actions: @@ -219,3 +218,13 @@ All the default actions can be prevented if we want to handle the event exclusiv To prevent a default action -- use either `event.preventDefault()` or `return false`. The second method works only for handlers assigned with `on`. If the default action was prevented, the value of `event.defaultPrevented` becomes `true`, otherwise it's `false`. + +```warn header="Stay semantic, don't abuse" +Technically, by preventing default actions and adding JavaScript we can customize the behavior of any elements. For instance, we can make a link `` work like a button, and a button `