COMP 20: Web Programming

Event Handling

What is an event?

Recall: HTML elements have event attributes

The idea of a listener (a.k.a., event handler)

The modern way: element.addEventListener() to a DOM element

DOM Event Types

Handling Keyboard Events

Geolocation