DOM Events

DOM Events are notification that some action has occurred on the page and can represent a basic user action or the status of the render model. For example, when a user clicks on a button, that is a DOM Event. When the pages loads, that is a DOM Event. When the page is scrolled, the window is resized, or the mouse is moved are all DOM Events. There are DOM Events for the keyboard, mouse, touch, clipboard, media, view, printing, drag & drop, animation, forms, and more.

Each event is represented by an Event interface, which acts as an object. It will include the event type and on which element the event occurred. Adding event listeners to DOM elements gives us a programmatic ability to interact with this Event interface and respond to these DOM event.

The following pages detail the different DOM event and how we can respond to them.