From e6229ed4ba8daaab73cfd620d24da0b4c82583ff Mon Sep 17 00:00:00 2001 From: weng Date: Sat, 14 Aug 2021 23:58:00 +0800 Subject: [PATCH 1/4] FIX: fix translation error in 2-ui/5-loading/01-onload-ondomcontentloaded/article.md original text: What happens if we set the DOMContentLoaded handler after the document is loaded? --- 2-ui/5-loading/01-onload-ondomcontentloaded/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2-ui/5-loading/01-onload-ondomcontentloaded/article.md b/2-ui/5-loading/01-onload-ondomcontentloaded/article.md index 7804c9dce8..f8a5c5fec0 100644 --- a/2-ui/5-loading/01-onload-ondomcontentloaded/article.md +++ b/2-ui/5-loading/01-onload-ondomcontentloaded/article.md @@ -187,7 +187,7 @@ window.onbeforeunload = function() { ## readyState -如果我们将 `DOMContentLoaded` 事件处理程序设置在文档加载完成之后,会发生什么? +如果我们在文档加载完成之后设置 `DOMContentLoaded` 事件处理程序,会发生什么? 很自然地,它永远不会运行。 From 048e60897cb66d15ebed4a3902935fa2a2af2b9f Mon Sep 17 00:00:00 2001 From: weng Date: Sun, 15 Aug 2021 00:10:09 +0800 Subject: [PATCH 2/4] FIX: fix translation error in 2-ui/2-events/01-introduction-browser-events/04-move-ball-field/task.md original text: When the page is scrolled, nothing should break. --- .../01-introduction-browser-events/04-move-ball-field/task.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2-ui/2-events/01-introduction-browser-events/04-move-ball-field/task.md b/2-ui/2-events/01-introduction-browser-events/04-move-ball-field/task.md index 5936c2ad31..20c7858bab 100644 --- a/2-ui/2-events/01-introduction-browser-events/04-move-ball-field/task.md +++ b/2-ui/2-events/01-introduction-browser-events/04-move-ball-field/task.md @@ -13,7 +13,7 @@ importance: 5 - 球的中心应该恰好在点击时鼠标指针位置的下方(如果在球不越过球场边缘的情况下,能实现的话)。 - 最好添加一些 CSS 动画。 - 球不能越过场地边界。 -- 页面滚动时,不会有任何中断。 +- 页面滚动时,布局不能被破坏。 注意: From 1c6f1a2153c5b3a14357c11a8a579e5689e8b246 Mon Sep 17 00:00:00 2001 From: weng Date: Thu, 19 Aug 2021 01:03:53 +0800 Subject: [PATCH 3/4] FIX: fix translation error in 5-network/06-fetch-api/article.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit original text: The keepalive option indicates that the request may “outlive” the webpage that initiated it. "outlive" means live longer than ... --- 5-network/06-fetch-api/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/5-network/06-fetch-api/article.md b/5-network/06-fetch-api/article.md index a8b1c5c644..87b573b61d 100644 --- a/5-network/06-fetch-api/article.md +++ b/5-network/06-fetch-api/article.md @@ -193,7 +193,7 @@ fetch('http://site.com/file', { ## keepalive -`keepalive` 选项表示该请求可能会使发起它的网页“失活(outlive)”。 +`keepalive` 选项表示该请求可能会在网页关闭后继续存在。 例如,我们收集有关当前访问者是如何使用我们的页面(鼠标点击,他查看的页面片段)的统计信息,以分析和改善用户体验。 From f7b90a8f422a54443cf8151900b37beb5eb91670 Mon Sep 17 00:00:00 2001 From: weng Date: Thu, 19 Aug 2021 06:39:34 +0800 Subject: [PATCH 4/4] IMP: translation in 6-data-storage/01-cookie/article.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit original text: 1. A samesite=lax cookie is sent if both of these conditions are true 2.So, what samesite=lax does, is to basically allow the most common “go to URL” operation to have cookies. E.g. opening a website link from notes that satisfy these conditions. --- 6-data-storage/01-cookie/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/6-data-storage/01-cookie/article.md b/6-data-storage/01-cookie/article.md index 63927b482f..97b322a2ca 100644 --- a/6-data-storage/01-cookie/article.md +++ b/6-data-storage/01-cookie/article.md @@ -232,7 +232,7 @@ Cookie 的 `samesite` 选项提供了另一种防止此类攻击的方式,( 宽松(lax)模式,和 `strict` 模式类似,当从外部来到网站,则禁止浏览器发送 cookie,但是增加了一个例外。 -如果以下两个条件均成立,则会发送 `samesite=lax` cookie: +如果以下两个条件均成立,则会发送含 `samesite=lax` 的 cookie: 1. HTTP 方法是“安全的”(例如 GET 方法,而不是 POST)。 所有安全的 HTTP 方法详见 [RFC7231 规范](https://tools.ietf.org/html/rfc7231)。基本上,这些都是用于读取而不是写入数据的方法。它们不得执行任何更改数据的操作。跟随链接始终是 GET,是安全的方法。 @@ -241,7 +241,7 @@ Cookie 的 `samesite` 选项提供了另一种防止此类攻击的方式,( 这通常是成立的,但是如果导航是在一个 `