What each change makes the browser redo
JavaScript the write itself, synchronous
Style which rules apply, final values
Layout position and size of every box
Paint drawing commands for each layer
Composite assemble layers into the frame
A text change invalidates the geometry, so every stage below it has to run again.
Stages below JavaScript run in the event loop's render stage, never during your task.