From 09caa137e715c2c8d74df68b2f325186225219e6 Mon Sep 17 00:00:00 2001 From: pigiysou147 <985694195@qq.com> Date: Tue, 11 Jan 2022 01:22:34 +0800 Subject: remove dummy word (#3615) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ‘一个标准的微任务队列机都制意味着’修改为‘一个标准的微任务队列机制意味着’ 去掉多余‘都’ --- files/zh-cn/web/api/html_dom_api/microtask_guide/in_depth/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'files/zh-cn') diff --git a/files/zh-cn/web/api/html_dom_api/microtask_guide/in_depth/index.html b/files/zh-cn/web/api/html_dom_api/microtask_guide/in_depth/index.html index 60ac12c2eb..f83b9bc3f4 100644 --- a/files/zh-cn/web/api/html_dom_api/microtask_guide/in_depth/index.html +++ b/files/zh-cn/web/api/html_dom_api/microtask_guide/in_depth/index.html @@ -166,7 +166,7 @@ greetUser("Veronica");

微任务是另一种解决该问题的方案,通过将代码安排在下一次事件循环开始之前运行而不是必须要等到下一次开始之后才执行,这样可以提供一个更好的访问级别。

-

微任务队列已经存在有一段时间了,但之前它仅仅被内部使用来驱动诸如 promise 这些。queueMicrotask()的加入可以让开发者创建一个统一的微任务队列,它能够在任何时候即便是当 JavaScript 执行上下文栈中没有执行上下文剩余时也可以将代码安排在一个安全的时间运行。 在多个实例、所有浏览器以及运行时中,一个标准的微任务队列机都制意味着这些微任务可以非常可靠的以相同的顺序执行,从而避免一些潜在的难以发现的错误。

+

微任务队列已经存在有一段时间了,但之前它仅仅被内部使用来驱动诸如 promise 这些。queueMicrotask()的加入可以让开发者创建一个统一的微任务队列,它能够在任何时候即便是当 JavaScript 执行上下文栈中没有执行上下文剩余时也可以将代码安排在一个安全的时间运行。 在多个实例、所有浏览器以及运行时中,一个标准的微任务队列机制意味着这些微任务可以非常可靠的以相同的顺序执行,从而避免一些潜在的难以发现的错误。

更多

-- cgit v1.2.3-54-g00ecf