The execution context stack, also called the call stack, tracks JavaScript functions that are currently executing. A call pushes a function onto the top; returning pops it. When the stack becomes empty, queued callbacks can begin execution. section 13.3.2
Its runtime responsibilities are straightforward:
- Run synchronous JavaScript immediately, keeping the active function at the stack top. section 13.3.2
- Receive callbacks selected by the event loop after the current stack is empty. section 13.3.2
- Provide the boundary that determines when task and microtask callbacks may run. section 13.3.2 section 13.3.3
Asynchronous mounting
During mountDOM(), an onMounted() hook begins synchronously and remains on the execution stack until its first await. The remainder resumes later as a microtask after the stack is empty, which can affect rendering and interaction timing. section 13.3.1







