events
6 tutorials tagged “events”.
- Event Propagation and DelegationHow events travel in capture, target and bubble phases, stopPropagation vs preventDefault, and event delegation with one listener for many elements.
- Events and addEventListenerMake pages respond to people: event types, addEventListener, the event object, removing listeners, the once and signal options, and the older onclick way.
- Mouse, Keyboard and Pointer EventsHandle clicks, pointer events for mouse, touch and pen, keyboard events with event.key, focus events, and make custom controls work with the keyboard too.
- Page Load EventsRun code at the right moment: DOMContentLoaded, load, defer and module scripts, document.readyState, visibilitychange, pagehide and beforeunload.
- Project: CounterBuild an accessible counter step by step: HTML first, state and a render function, limits, keyboard shortcuts, screen reader announcements and saving.
- Project: To-Do ListBuild a complete to-do list: add, complete, edit and delete tasks, filter them, keep counts, save to localStorage, and use one delegated listener.