liveBook · Manning

Page building

As explained in Secrets of the JavaScript Ninja, Second Edition

The phase of a web application's lifecycle in which the user interface is set up before event handling begins.

Page building is the first phase of a client-side web application's lifecycle: the browser processes HTML to create the DOM, then runs global JavaScript as it encounters script nodes. That code can modify the DOM and register event handlers before the application enters event handling. section 2.4 section 2.1

A page that logs activity

A small interface adds a “Page loading” message during page building. It also registers mousemove and click handlers, which add messages when those events occur. section 2.1

Figure 2.1. The lifecycle of a client-side web application starts with the user specifying a website address (or clicking a link) and ends when the user leaves the web page. It’s composed of two steps: page building and event handling.

Shows how page building and event handling fit into the client-side application lifecycle. section 2.1

How Secrets of the JavaScript Ninja, Second Edition covers it

How deep it goes
Explains DOM creation, script execution, DOM modification, and handler registration, while treating event processing as a separate phase.
Examples
Uses a message-list interface that logs page loading, mouse movement, and clicks.
What you can do after
Understand how the browser creates and configures the DOM before processing user events.
How it connects
Connects HTML processing and JavaScript execution with the DOM and event handling.

This explainer was generated by Manning's knowledge graph from the text of Secrets of the JavaScript Ninja, Second Edition. The section links point to the parts of the book it draws on.