liveBook · Manning

Event handling

Event handling is the process of receiving events and invoking associated code to respond to them.

How 3 Manning books explain it

Secrets of the JavaScript Ninja, Second Edition

The phase of a web application's lifecycle in which the program waits for events and invokes event handlers.

How it is used
Defines the runtime phase that responds to events after the page has been built.
How deep it goes
Explains event queuing, sequential handler execution, and responsiveness, while deferring detailed performance effects.
Examples
Uses mousemove and click events to append messages to a list in the DOM.
What you can do after
Understand how browsers queue events, invoke handlers, and defer later events until the current handler finishes.

Read how Secrets of the JavaScript Ninja, Second Edition explains event handling →

Secrets of the JavaScript Ninja, Third Edition

Event handling is the process of receiving events and invoking associated handler functions to respond to them.

How it is used
Provides GUI interactivity by registering functions that run when browser events occur.
How deep it goes
Traces event processing through a queue and one-at-a-time handler execution, while deferring detailed event-loop effects.
Examples
Demonstrates DOMContentLoaded and keydown handlers that append event messages to a list.
What you can do after
Apply it via browser event listeners to make a page respond to user actions.

Read how Secrets of the JavaScript Ninja, Third Edition explains event handling →

Web Component Development with Modern Libraries and Tooling

Event handling is the association of executable code with dispatched events so that interactions can trigger behavior.

How it is used
Connects user interactions and component state changes to executable handlers and parent-observable events.
How deep it goes
Explains handler attributes, Event objects, inline expressions, and upward dispatch, but stops short of browser event internals.
Examples
Uses GoogleButton click handlers and a basic counter that updates count and reports change details.
What you can do after
Build it from scratch by attaching handlers to template elements and dispatching events when component properties change.

Read how Web Component Development with Modern Libraries and Tooling explains event handling →

What to know first

Related concepts

Questions about event handling

What is event handling?

Event handling is the process of receiving events and invoking associated code to respond to them.

Which Manning books explain event handling?

Secrets of the JavaScript Ninja, Second Edition, Secrets of the JavaScript Ninja, Third Edition and Web Component Development with Modern Libraries and Tooling.

What should I know before learning event handling?

Manning books that teach event handling usually introduce handler, web application, CSS and event first.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.