Blocking the main thread
Long synchronous work keeps a frame on the stack, so the loop can't reach queued tasks or repaint. Clicks, script-driven animations, and rendering freeze until it finishes; compositor-only animations (transform, opacity) and scrolling can keep going.
A heavy while-loop makes the page unresponsive until it's done.
UI: live
Call stack
Task queue