setTimeout callbacks, user interaction events and scripts are macro tasks (or just tasks). When scheduled, they are added to a queue and are executed one by one (one per event loop cycle).

#eventloop #webdevelopment #browser #webperf

Promise and MutationObserver callbacks are micro tasks. They have their own queue which is executed until empty every time the JS call stack empties. This includes micro tasks that are scheduled during a micro task execution. You can also schedule a microtask with queueMicrotask.
requestAnimationFrame callbacks are queued into yet another queue, which is executed until empty upon every render (after the macro tasks bit and right before styling, layouting and painting). rAF that is scheduled during another rAF callback will execute on the next render.
This means that multiple macro tasks can occur in between two renders and multiple micro tasks as well as multiple rAF callbacks can occur in between two macro tasks. Each one of them might be possibly blocking for the main thread and thus hurt user experience.
Even if each one of these guys executes fast, when accumulated, they can create a significant delay between two renders. This is why Long Animation Frames (rather than Long Tasks) @noam is working on are so important.