xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

queueMicrotask & microtask All In One

queueMicrotask & microtask All In One

microtask

  1. microtask queue

Promise
Mutation Observer API

MutationObserver

突变观察者

macrotask

requestAnimationFrame

requestIdleCallback ???

setInterval
setTimeout

Web APIs

微任务

https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/queueMicrotask

https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API/Microtask_guide

https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API/Microtask_guide/In_depth

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise

https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver

https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver/MutationObserver

宏任务 / 任务

https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame

https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback

https://developer.mozilla.org/en-US/docs/Web/API/Window/setTimeout

https://developer.mozilla.org/en-US/docs/Web/API/Window/setInterval

https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate

https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope

https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout

https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval

https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setImmediate

WorkerGlobalScope.importScripts()

importScripts(path0)
importScripts(path0, path1)
importScripts(path0, path1, /* … ,*/ pathN)

https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/importScripts

https://stackoverflow.com/questions/16310091/importscripts-web-workers

Web Worker

https://www.ruanyifeng.com/blog/2018/07/web-worker.html

(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!

refs

queueMicrotask & EventLoop & macrotask & microtask All In One

https://www.cnblogs.com/xgqfrms/p/13112261.html



©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2020-07-27 21:49  xgqfrms  阅读(288)  评论(5编辑  收藏  举报