Skip to content

Commit ecb2c8d

Browse files
authored
Fix: translation errrors (#940)
* 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? * 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. * FIX: fix translation error in 5-network/06-fetch-api/article.md original text: The keepalive option indicates that the request may “outlive” the webpage that initiated it. "outlive" means live longer than ... * IMP: translation in 6-data-storage/01-cookie/article.md 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.
1 parent 787c4cf commit ecb2c8d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

2-ui/2-events/01-introduction-browser-events/04-move-ball-field/task.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ importance: 5
1313
- 球的中心应该恰好在点击时鼠标指针位置的下方(如果在球不越过球场边缘的情况下,能实现的话)。
1414
- 最好添加一些 CSS 动画。
1515
- 球不能越过场地边界。
16-
- 页面滚动时,不会有任何中断
16+
- 页面滚动时,布局不能被破坏
1717

1818
注意:
1919

2-ui/5-loading/01-onload-ondomcontentloaded/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ window.onbeforeunload = function() {
187187

188188
## readyState
189189

190-
如果我们将 `DOMContentLoaded` 事件处理程序设置在文档加载完成之后,会发生什么?
190+
如果我们在文档加载完成之后设置 `DOMContentLoaded` 事件处理程序,会发生什么?
191191

192192
很自然地,它永远不会运行。
193193

5-network/06-fetch-api/article.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ fetch('http://site.com/file', {
193193

194194
## keepalive
195195

196-
`keepalive` 选项表示该请求可能会使发起它的网页“失活(outlive)”
196+
`keepalive` 选项表示该请求可能会在网页关闭后继续存在
197197

198198
例如,我们收集有关当前访问者是如何使用我们的页面(鼠标点击,他查看的页面片段)的统计信息,以分析和改善用户体验。
199199

6-data-storage/01-cookie/article.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ Cookie 的 `samesite` 选项提供了另一种防止此类攻击的方式,(
232232

233233
宽松(lax)模式,和 `strict` 模式类似,当从外部来到网站,则禁止浏览器发送 cookie,但是增加了一个例外。
234234

235-
如果以下两个条件均成立,则会发送 `samesite=lax` cookie:
235+
如果以下两个条件均成立,则会发送含 `samesite=lax` cookie:
236236
1. HTTP 方法是“安全的”(例如 GET 方法,而不是 POST)。
237237

238238
所有安全的 HTTP 方法详见 [RFC7231 规范](https://tools.ietf.org/html/rfc7231)。基本上,这些都是用于读取而不是写入数据的方法。它们不得执行任何更改数据的操作。跟随链接始终是 GET,是安全的方法。
@@ -241,7 +241,7 @@ Cookie 的 `samesite` 选项提供了另一种防止此类攻击的方式,(
241241

242242
这通常是成立的,但是如果导航是在一个 `<iframe>` 中执行的,那么它就不是顶级的。此外,用于网络请求的 JavaScript 方法不会执行任何导航,因此它们不适合。
243243

244-
所以,`samesite=lax` 所做的是基本上允许最常见的“去往 URL”操作具有 cookie。例如,从笔记本中打开网站链接就满足这些条件
244+
所以,`samesite=lax` 所做的是基本上允许最常见的“前往 URL”操作携带 cookie。例如,从笔记中打开网站链接就满足这些条件
245245

246246
但是,任何更复杂的事儿,例如来自另一个网站的网络请求或表单提交都会丢失 cookie。
247247

0 commit comments

Comments
 (0)