JavaScript macro and micro task task

How should I say emmm, event loop browser task queue is divided into macro tasks (macrotask) and micro-task (microtask), the implementation of both the priority (or in a different order)

Entitled reprint

Author: xiaohesong
link: https: //juejin.im/post/5d4ecc4bf265da03dc075e4b
Source: Nuggets

 

The answer See link: https: //juejin.im/post/5d4ecc4bf265da03dc075e4b

The following is a reference

https://github.com/xiaohesong/TIL/blob/master/front-end/javascript/js-engine-work.md

https://jakearchibald.com/2015/tasks-microtasks-queues-and-schedules/

Guess you like

Origin www.cnblogs.com/passbysomeone/p/11334384.html