Chapter 10. Event Objects

IN THIS CHAPTER

  • Event History

  • Event Propagation

  • Referring to the Event Object

Without events, the Web would be really, really boring. Events are things that happen in browsers, such as pages loading, mouse clicks and motion, keyboard keys being pressed, and the like. JavaScript has constructs called event handlers that spring into action whenever an event occurs. You can usually tell an event handler from an event because event handlers start with “on.” For example, the click event has an onclick event handler. The mousedown event has an onmousedown event handler.

Get Advanced JavaScript™: Insights and Innovative Techniques now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.