Skip to main content

Module lifecycle

Module lifecycle 

Source
Expand description

Document lifecycle — state machine enforcing phase ordering.

Chrome equivalent: DocumentLifecycle in core/dom/document_lifecycle.h.

Phases progress in strict order:

VisualUpdatePending → InStyleRecalc → StyleClean
                    → InLayout → LayoutClean
                    → InPrePaint → PrePaintClean
                    → InPaint → PaintClean

Each phase gates the next. You cannot run layout before style is clean, and you cannot paint before layout is clean.

Enums§

LifecycleState
The current lifecycle state of a document.