From 7e9a06c0e3dcce027266e048675efaa5fad9ea93 Mon Sep 17 00:00:00 2001 From: Elan Bin Date: Sun, 11 Jul 2021 19:10:32 +0800 Subject: fix: the '主线程' jump to the correct link, zh-CN (#1484) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: the '主线程' jump to the correct link '主线程' has been translated --- 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/web/api') 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 14e1139cfc..827393f1ea 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 @@ -114,7 +114,7 @@ greetUser("Veronica");

每个代理都是由事件循环驱动的,事件循环负责收集用事件(包括用户事件以及其他非用户事件等)、对任务进行排队以便在合适的时候执行回调。然后它执行所有处于等待中的 JavaScript 任务(宏任务),然后是微任务,然后在开始下一次循环之前执行一些必要的渲染和绘制操作。

-

网页或者 app 的代码和浏览器本身的用户界面程序运行在相同的 {{Glossary("线程")}}中, 共享相同的 事件循环。 该线程就是 {{Glossary("主线程")}},它除了运行网页本身的代码之外,还负责收集和派发用户和其它事件,以及渲染和绘制网页内容等。

+

网页或者 app 的代码和浏览器本身的用户界面程序运行在相同的 {{Glossary("线程")}}中, 共享相同的 事件循环。 该线程就是 {{Glossary("main thread", "主线程")}},它除了运行网页本身的代码之外,还负责收集和派发用户和其它事件,以及渲染和绘制网页内容等。

然后,事件循环会驱动发生在浏览器中与用户交互有关的一切,但在这里,对我们来说更重要的是需要了解它是如何负责调度和执行在其线程中执行的每段代码的。

-- cgit v1.2.3-54-g00ecf