Understanding the JavaScript Event Loop: Macrotasks, Microtasks, and Vue NextTick
Macrotasks and Microtasks
When a browser loads a standard <script> tag (ignoring attributes like defer), the execution of that script creates the initial macrotask. Within this execution context, various operations occur. For instance, if you set up a click listener or initiate a network request (like fetch), the callback functions for th ...
Posted on Sun, 14 Jun 2026 16:24:15 +0000 by cspgsl
Understanding Promise Internals: A Deep Dive into Promise/A+ Implementation
Constructor
The Promise constructor accepts an executor function that receives two arguments: resolve and reject. This is where the core initialization logic resides.
class SimplePromise {
constructor(executor) {
this.status = PENDING;
this.onFulfilledCallbacks = [];
this.onRejectedCallbacks = [];
executor(
...
Posted on Fri, 08 May 2026 04:06:07 +0000 by jmosterb