Language / Technology

Why does JavaScript use events?

Short answer

Events let JavaScript run code in response to browser activity such as clicks, input, and loading.

How it works

Event code should account for keyboard use and repeated registration. Core content should remain usable without optional dynamic behavior.

Key point

The practical point is this: Core content should remain usable without optional dynamic behavior.

References