Event Handling

This tag marks examples where the path an event travels is the substance of the answer: listener options that decide capture order, delegated handlers that survive a changing list, cleanup that runs before a node is discarded, and passive listeners that keep scrolling responsive. The grouped pages name the element the listener is bound to and the phase in which the handler executes, so the reader can predict behaviour inside a larger widget. Read the task groups to separate listeners you attach from visibility signals you subscribe to, then continue into the form and layout examples that depend on the same event objects.

This is a controlled cross-cutting tag: it groups Examples that share one facet, not a bounded topic. In scope:Include when an example's correctness depends on how an event reaches its handler. Out of scope: Exclude examples that mention an event name only while describing state changes.

6 published examples.

Handle DOM events

3 examples

Attach, configure, delegate, and remove browser event listeners correctly.

Observe element visibility

2 examples

React to intersection, viewport entry, or document visibility changes.

Validate form input

1 example

Decide whether entered data is acceptable and report the result to the person filling the form.

Adjacent navigation