Skip to content

Tasks, microtasks, queues and schedules

Updated: at 08:27 PM

JavaScript Promises and Mutation Observers schedule work as microtasks which fire after the script finishes but before the next event loop. Not all browsers get it right.

Jake Archibald writes:

When I told my colleague Matt Gaunt I was thinking of writing a piece on microtask queueing and execution within the browser’s event loop, he said “I’ll be honest with you Jake, I’m not going to read that”. Well, I’ve written it anyway, so we’re all going to sit here and enjoy it, ok?

Read the blog article at jakearchibald.com