Please enable JavaScript.
Coggle requires JavaScript to display documents.
Event Properties, JS Events, Event Properties - Coggle Diagram
-
JS Events
2. Event Registration
- Using tag attributes
- Using dot notation
- Using addEventListener()
3. Legacy Browsers
- Support for legacy browsers
- Special problem for events
- IE8 and earlier use different model
4. The Event Object
- Capturing an event returns an object
- May be different in browsers
- Data will depend on type of event
- Lots of browser and environment info
1. Understanding Events
- JavaScript code runs sequentially
- Events can trigger scripts
- Browsers trigger events
- Events may happen anytime
5. Event Propagation
- An element can capture child events
- A good reason to use addEventListener()
- Not compatible with IE8
6. Capturing vs Bubbling
- Browsers disagree on the order
- Capturing goes down the DOM
- Bubbling goes up the DOM
7. Stopping Propagation
- Propagation saves time
- It can be stopped
- use the stopPropagation() method
- cancelbubble = true for < IE8
-
-