Events
Event objects
Preventing default behavior
Event bubbling and capturing
Exercises
- Change Example 20.1 by adding another button. What's the benefit of using event object in this example?
- When we click on a link, what's the default behavior? How do we prevent default behavior?
- What is event bubbling? In an event handler or listener of an element, how do we prevent the event from bubbling up to its parent?