aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn')
-rw-r--r--files/zh-cn/mdn/contribute/index.html4
-rw-r--r--files/zh-cn/mdn/structures/macros/index.html34
-rw-r--r--files/zh-cn/mdn/structures/macros/other/index.html92
-rw-r--r--files/zh-cn/mdn/yari/index.html1
-rw-r--r--files/zh-cn/web/api/document/execcommand/index.html2
-rw-r--r--files/zh-cn/web/api/element/after/index.html91
-rw-r--r--files/zh-cn/web/api/element/before/index.html193
-rw-r--r--files/zh-cn/web/api/element/remove/index.html98
-rw-r--r--files/zh-cn/web/api/element/replacewith/index.html116
-rw-r--r--files/zh-cn/web/api/fetch_api/using_fetch/index.html2
-rw-r--r--files/zh-cn/web/api/renderingcontext/index.html30
-rw-r--r--files/zh-cn/web/api/web_workers_api/index.html2
-rw-r--r--files/zh-cn/web/api/web_workers_api/structured_clone_algorithm/index.html2
-rw-r--r--files/zh-cn/web/api/window/requestidlecallback/index.html2
-rw-r--r--files/zh-cn/web/css/vertical-align/index.html2
-rw-r--r--files/zh-cn/web/html/element/input/checkbox/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/encodeuricomponent/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/strict_mode/index.html2
-rw-r--r--files/zh-cn/web/security/weak_signature_algorithm/index.html32
19 files changed, 679 insertions, 30 deletions
diff --git a/files/zh-cn/mdn/contribute/index.html b/files/zh-cn/mdn/contribute/index.html
index dfe3a9361d..bc427255e1 100644
--- a/files/zh-cn/mdn/contribute/index.html
+++ b/files/zh-cn/mdn/contribute/index.html
@@ -15,7 +15,7 @@ translation_of: MDN/Contribute
<div class="notecard note">
<h4>注意</h4>
- <p>目前 <a href="https://hacks.mozilla.org/2020/10/mdn-web-docs-evolves-lowdown-on-the-upcoming-new-platform/">MDN 的内容已经迁移至 GitHub </a>,之前编辑网站内容的已经失效。不论你之前是否参与编辑过 MDN 网站的内容,你都可以在<a href="/zh-CN/docs/MDN/Contribute/Getting_started">初识 MDN</a> 中了解新的参与方式。</p>
+ <p>目前 <a href="https://hacks.mozilla.org/2020/10/mdn-web-docs-evolves-lowdown-on-the-upcoming-new-platform/">MDN 的内容已经迁移至 GitHub </a>,之前编辑网站内容的途径已经失效。不论你之前是否参与编辑过 MDN 网站的内容,你都可以在<a href="/zh-CN/docs/MDN/Contribute/Getting_started">初识 MDN</a> 中了解新的参与方式。</p>
</div>
<h2 id="What_can_I_do_to_help">我可以做些什么?</h2>
@@ -108,7 +108,7 @@ translation_of: MDN/Contribute
</ul>
<div class="notecard note">
-<p><strong>注意</strong>:如果你在使用 MDN 时发现了一些错误,却不知道怎么改正,你可以<a href="https://github.com/mdn/content/issues/new">提交一个 issue</a>。记得写个合适的标题(你可以在 issue 列表里参考一下别人的格式),并简单描述一下问题的位置和涉及到的内容,这样可以方便别人确定问题到底出在哪。</p>
+<p><strong>注意</strong>:如果你在使用 MDN 时发现了一些错误,却不知道怎么改正,你可以<a href="https://github.com/mdn/content/issues/new/choose">提交一个 issue</a>。记得写个合适的标题(你可以在 <a href="https://github.com/mdn/content/issues">issue 列表</a>里参考一下别人的格式),并简单描述一下问题的位置和涉及到的内容,这样可以方便别人确定问题到底出在哪。如果你发现的问题属于翻译上的错误,<a href="https://github.com/mdn/translated-content/issues/new/choose">向 Translated-content Repo提交一个 issue</a> 会更加合适。</p>
</div>
<h2 id="Other_useful_pages">相关链接</h2>
diff --git a/files/zh-cn/mdn/structures/macros/index.html b/files/zh-cn/mdn/structures/macros/index.html
index b41123ab3f..4227374bac 100644
--- a/files/zh-cn/mdn/structures/macros/index.html
+++ b/files/zh-cn/mdn/structures/macros/index.html
@@ -1,5 +1,5 @@
---
-title: Macros
+title: 使用宏
slug: MDN/Structures/Macros
tags:
- Guide
@@ -11,36 +11,32 @@ translation_of: MDN/Structures/Macros
---
<div>{{MDNSidebar}}</div>
-<p><a href="/en-US/docs/Project:MDN/Kuma" title="/en-US/docs/Project:MDN/Kuma">Kuma</a> 平台为 MDN 提供了强大的宏系统——<a href="/en-US/docs/Project:MDN/Kuma/KumaScript_guide" title="/en-US/docs/Project:MDN/Kuma/KumaScript_guide">KumaScript</a>,使得 MDN 能够自动地去做各种东西。本文提供一些信息以便大家知道如何使用 MDN 上的文章内的宏。</p>
+<p><span class="seoSummary">为了自动化执行某些工作,<a href="/zh-CN/docs/MDN/Yari">Yari</a> 平台提供了一个强大的宏系统——<a href="/zh-CN/docs/MDN/Tools/KumaScript">KumaScript</a>。本文提供了一些相关信息,方便你在参与编辑 MDN 时,使用这些宏。</span></p>
-<p>鉴于本文只是 KumaScript 的简介,<a href="/zh-CN/docs/Project:MDN/Kuma/KumaScript_guide" title="/en-US/docs/Project:MDN/Kuma/KumaScript_guide">KumaScript 指南</a>提供了更深入的内容。</p>
+<p>本文只是简要介绍了 KumaScript,<a href="/zh-CN/docs/MDN/Kuma/KumaScript_guide" title="/zh-CN/docs/MDN/Kuma/KumaScript_guide">KumaScript 指南</a>提供了更深入的内容,帮助你使用和掌握它。</p>
-<h2 id="宏是如何实现的">宏是如何实现的</h2>
+<h2 id="How_macros_are_implemented">宏是如何实现的</h2>
-<p>MDN使用的Macros(宏)是基于<a href="http://nodejs.org/" title="http://nodejs.org/">Node.js</a>执行环境,并在服务端执行运行。这里包括了大量的代码库,另外对此还提供了丰富的wiki说明文档内容。如果你希望能学习到更多的内容,可以查看 <a href="/en-US/docs/Project:MDN/Kuma/KumaScript_guide" title="/en-US/docs/Project:MDN/Kuma/KumaScript_guide">KumaScript 指南</a>, <a href="/en-US/docs/Project:MDN/Kuma/KumaScript_reference" title="/en-US/docs/Project:MDN/Kuma/KumaScript_reference">KumaScript reference</a> 则提供了更多关于这些代码库和KumaScript的API的实现机理。</p>
+<p>MDN 使用宏是基于运行于服务器上的 JavaScript 代码实现的,并由 <a href="http://nodejs.org/">Node.js</a> 解释执行。在此之上,已经实现了一个丰富的工具库,让宏可以与这个平台及其中的内容进行互动。</p>
-<h2 id="在文章中使用宏">在文章中使用宏</h2>
+<h2 id="Using_a_macro_in_content">在文章中使用宏</h2>
-<p>要实际使用宏,只需将对宏的调用括在一对双括号中,其参数(如果有)括在括号中;如下:</p>
+<p>要实际使用宏,只需将对宏的调用和可能需要的参数写在一对双括号中,如下:</p>
<pre class="notranslate">\{{macroname(parameter-list)}}</pre>
<p>关于宏调用的一些注意事项:</p>
<ul>
- <li>宏名称区分大小写,但有些尝试是为了纠正常见的大写错误;即使宏名称在其中使用大写,您也可以使用全部小写,并且您可以将名称通常以小写字母开头的宏大写。</li>
- <li>参数以逗号分隔</li>
- <li>如果没有参数,您可以完全省略括号; <code>\{{macroname()}}</code> 和 <code>\{{macroname}}</code> 完全相同。</li>
- <li>数字参数可以是引号,也可以不是。这取决于您(但是,如果您的版本号中包含多个小数,则需要在引号中)</li>
- <li>如果您遇到错误,请仔细检查您的代码。如果仍然无法弄清楚发生了什么,请参阅<a href="/en-US/docs/MDN/Kuma/Troubleshooting_KumaScript_errors">Troubleshooting KumaScript errors</a>以获取帮助。</li>
+ <li>宏的名称区分大小写,但一些常见的大小写错误也可以在执行时被纠正。比如将某个名称中含有大写的宏,全部使用小写字母,或者将某些名字以小写开头的宏大写。</li>
+ <li>参数以逗号分隔。</li>
+ <li>如果没有参数,括号可以省略:<code>\{{macroname()}}</code> 和 <code>\{{macroname}}</code> 的效果是。</li>
+ <li>数字参数可以是引号,也可以不是。这取决于您(但是,像版本号这类可能被识别成小数的参数,则包含在引号中)</li>
+ <li>如果遇到错误,请先仔细检查代码。如果仍然无法弄清楚发生了什么,请参阅<a href="/zh-CN/docs/MDN/Tools/KumaScript/Troubleshooting">排查 KumaScript 中的错误</a>以获取帮助。</li>
</ul>
-<p>宏被高度缓存;对于任何一组输入值(参数和环境值,例如运行宏的URL),结果都会被存储和重用。这意味着宏仅在输入发生变化时才实际运行。</p>
+<p>宏的几乎所有执行结果都会被缓存,以便被重用来加快执行速度。这意味着宏仅在输入发生变化时才实际运行,包括调用时的参数以及环境值(例如这个宏被调用时所在的路径)。</p>
-<div class="note">
-<p><strong>注意:</strong> 您可以通过在浏览器中强制刷新页面(即转移重新加载)来强制重新评估页面上的所有宏。</p>
-</div>
+<p>宏既可以用来做一些简单的工作,比如插入更大的文本块或从MDN的另一部分交换内容一样简单,也可以通过搜索站点的各个部分,设置输出样式和添加链接来构建整个内容索引。</p>
-<p>宏可以像插入更大的文本块或从MDN的另一部分交换内容一样简单,也可以通过搜索站点的各个部分,设置输出样式和添加链接来构建整个内容索引。</p>
-
-<p>您可以在<a href="/en-US/docs/MDN/Contribute/Structures/Macros/Commonly-used_macros" title="/en-US/docs/Project:MDN/Contributing/Custom_macros">Commonly-used macros</a>页面上阅读我们最常用的宏;另外,这里有<a href="https://developer.mozilla.org/en-US/docs/templates" title="https://developer.mozilla.org/en-US/docs/templates">complete list of all macros</a>。大多数宏都有内置的文档,作为顶部的注释。</p>
+<p>您可以在<a href="/zh-CN/docs/MDN/Contribute/Structures/Macros/Commonly-used_macros">常用的宏</a>页面看到一些我们最常用到的宏,还可以在我们 Github 的仓库中,浏览<a href="https://github.com/mdn/yari/tree/master/kumascript/macros">所有可用的宏</a>。大多数宏顶部的注释中,都有内置的文档帮助你了解它的作用。</p>
diff --git a/files/zh-cn/mdn/structures/macros/other/index.html b/files/zh-cn/mdn/structures/macros/other/index.html
new file mode 100644
index 0000000000..d9dd6f2ea3
--- /dev/null
+++ b/files/zh-cn/mdn/structures/macros/other/index.html
@@ -0,0 +1,92 @@
+---
+title: 其他需要注意的宏
+slug: MDN/Structures/Macros/Other
+tags:
+ - Macros
+ - Reference
+---
+<div>{{MDNSidebar}}</div>
+
+<p>In contrast to the macros listed in <a href="/en-US/docs/MDN/Structures/Macros/Commonly-used_macros">Commonly-used macros</a>, the macros documented in this article are used infrequently or only in specific contexts, or are deprecated.</p>
+
+<h2 id="Special_contexts">Special contexts</h2>
+
+<p>These macros are used only with particular contexts, such as a specific API reference.</p>
+
+<ul>
+ <li><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/Interwiki.ejs">Interwiki</a></code> makes it easy to create interwiki links. Currently it supports linking to Wikipedia and Wikimo. The first parameter is the name of the wiki ("wikipedia" or "wikimo"), and the second is the path of the article. For example, <code>\{\{interwiki("wikipedia", "Firefox")\}\}</code> shows up as {{ interwiki("wikipedia", "Firefox") }}. This template auto-detects the page language and directs to the same language on Wikipedia, for example.</li>
+ <li><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/RFC.ejs">RFC</a></code> creates a link to the specified RFC, given its number. The syntax is: <code>\{\{RFC(number)\}\}</code>. For example, <code>\{\{RFC(2616)\}\}</code> becomes {{ RFC(2616) }}.</li>
+ <li>The <code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/anch.ejs">anch</a></code> macro inserts a link to an anchor. <code>\{\{Anch("top")\}\}</code> produces <code>&lt;a href="#top"&gt;top&lt;/a&gt;</code> ({{ Anch("top") }}). You can also add a second parameter which contains replacement text to display as the link text.</li>
+</ul>
+
+<h3 id="Landing_page_components">Landing page components</h3>
+
+<p>We have an assortment of macros that can be used to automatically generate the contents of landing pages. Here they are.</p>
+
+<h4 id="Lists_of_subpages">Lists of subpages</h4>
+
+<ul>
+ <li><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/ListSubpages.ejs">ListSubpages</a></code> generates an unordered list of links to all the immediate children of the current page; useful for automatically generating tables of contents for sets of documentation.</li>
+ <li><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/LandingPageListSubpages.ejs">LandingPageListSubpages</a></code> outputs a two-column definition list of all immediate subpages of the current page, with their titles as the {{HTMLElement("dt")}} and their SEO summary as the {{HTMLElement("dd")}}. This makes it easy to automatically generate reasonably attractive landing pages.</li>
+ <li><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/NavListWithPrioritizedPages.ejs">NavListWithPrioritizedPages</a></code> generates an ordered list formatted properly for use in a zone navigation sidebar (or quicklinks). As input, you can specify zero or more page slugs that should be pulled out of the main list and instead inserted at the top of the list, in the given order. All remaining pages are placed in the list alphabetically. One level of subpages is included.</li>
+ <li><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/APIListAlpha.ejs">APIListAlpha</a></code> builds a list of the current page's subpages, formatted as a list of API terms, divided up by first letter. There are three parameters. The first is 0 if you want to include all top-level subpages or 1 to leave out subpages with "." in their names. The second and third let you add text to display as part of the name in each link. This can be used to add "&lt;" and "&gt;" for element links, or to add "()" at the end of lists of method names.</li>
+ <li><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/SubpagesWithSummaries.ejs">SubpagesWithSummaries</a></code> constructs a definition list of all the immediate children of the current page. There is no other formatting done. You can get a two-column list ready for use as a multi-column landing page using <code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/LandingPageListSubpages.ejs">LandingPageListSubpages</a></code>.</li>
+</ul>
+
+<h3 id="Quicklinks">Quicklinks</h3>
+
+<p>We have some macros specifically designed to create <a href="/en-US/docs/MDN/Structures/Quicklinks">quicklinks</a>:</p>
+
+<ul>
+ <li>The <code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/MakeSimpleQuicklinks.ejs">MakeSimpleQuicklinks</a></code> macro creates a flat list of links in the quicklinks box. Give it a set of paths to destination pages as its input arguments. Each link's text is the page title, and each link has a tooltip derived from the page summary.</li>
+ <li><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/QuickLinksWithSubpages.ejs">QuickLinksWithSubpages</a></code> creates a set of quicklinks comprised of the pages below the current page (or specified page, if one is given). Up to two total levels of depth are generated.</li>
+</ul>
+
+<h3 id="Transclusion">Transclusion</h3>
+
+<p><strong>Transclusion</strong> is the embedding of part or all of one page into another. Exercise caution when using this macro, to ensure that the transcluded content makes sense in the context of the page it is embedded into.</p>
+
+<p><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/page.ejs">page</a></code> lets you embed some or all of a specific page into a document. It accepts five parameters:</p>
+
+<ol>
+ <li>The URI of the page to transclude. For example, "/en-US/docs/MDN/About".</li>
+ <li>The name of the section within the page to transclude. This can be specified either as the title string or as the ID of a block to copy over. If not specified, the entire article is transcluded. {{optional_inline}}</li>
+ <li>The revision number of the page version to transclude. This feature is not currently implemented, but would allow including text from specific versions of an article. {{unimplemented_inline}}</li>
+ <li>A Boolean value indicating whether or not to show the heading of the top-level section being transcluded. This is useful if you wish to specify your own heading. The default value is false, meaning the heading is not included by default. {{optional_inline}}</li>
+ <li>The heading level to use as the top heading level. This adjusts the outermost first-discovered level of the transcluded content to the specified number, and all other headings correspondingly. This lets you include content that has its own headings but adjust them to match the heading level at which you're including them. If you don't specify this value, the headings are not adjusted. {{unimplemented_inline}}</li>
+</ol>
+
+<h4 id="Example_without_heading">Example without heading</h4>
+
+<p>\{{Page("/en-US/docs/MDN/About", "How you can help")}}</p>
+
+<p>Result:</p>
+
+<p>{{Page("/en-US/docs/MDN/About", "How you can help")}}</p>
+
+<h4 id="Example_with_heading">Example with heading</h4>
+
+<p>\{{Page("/en-US/docs/MDN/About", "How you can help", 0, 1)}}</p>
+
+<p>Result:</p>
+
+<p>{{Page("/en-US/docs/MDN/About", "How you can help", 0, 1)}}</p>
+
+<h2 id="Deprecated">Deprecated</h2>
+
+<p>These macros have been replace by other ways of doing the same thing, and should no longer be used. If you find them in existing articles, please replace them.</p>
+
+<h3 id="Linking">Linking</h3>
+
+<ul>
+
+ <li>The <code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/SectionOnPage.ejs">SectionOnPage</a></code> macro creates a phrase that links to both the name of a section and the article containing that section. For example, <code>\{{SectionOnPage("/en-US/docs/Mozilla/Firefox/Releases/21", "Changes for Web developers")}}</code> outputs the following: <em>{{SectionOnPage("/en-US/docs/Mozilla/Firefox/Releases/21", "Changes for Web developers")}}</em>.</li>
+ <li>The <code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/manch.ejs">manch</a></code> inserts a link to a method within the current interface; this is intended only for use in interface documentation pages. <code>\{\{manch("foo")\}\}</code> produces <code>&lt;code&gt;&lt;a href="current/path#foo"&gt;foo()&lt;/a&gt;&lt;/code&gt;</code> ({{ manch("foo") }}).</li>
+ <li>The <code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/Link.ejs">Link</a></code> macro inserts a link to the specified page on MDN, using the page's title as the visible string to click on, and the tooltip picked up from the page's SEO summary.</li>
+ <li>The <code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/LinkItem.ejs">LinkItem</a></code> macro inserts a link to a specified URL, with the indicated text as the visible string to click on. The link automatically picks up as its tooltip the summary of the target page. This differs from <code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/Link.ejs">Link</a></code> in that you must specify the title.</li>
+ <li>The <code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/LinkItemDL.ejs">LinkItemDL</a></code> macro inserts a link to a specified URL, with the indicated text as a {{HTMLElement("dt")}} which is also the link. The {{HTMLElement("dd")}} element contains the specified page's summary.</li>
+ <li><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/funcref.ejs">funcref</a></code> creates links to global functions (usually C++) documented on top-level pages. However, such pages are no longer created at the top-level of MDN.</li>
+ <li><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/source.ejs">source</a></code> allows you to link to a Mozilla source code file without having to type a long MXR URL using this syntax: <code>\{\{Source("browser/Makefile.in")\}\}</code>. This gives you: {{ Source("browser/Makefile.in") }}. The text of the link is the path provided; if you want different text, then just provide a second parameter, like so: <code>\{\{Source("browser/Makefile.in", "the browser/ Makefile.in")\}\}</code>, which produces {{ Source("browser/Makefile.in", "the browser/ Makefile.in") }}. Note that the link will be to the very latest version of the file in bleeding-edge code.</li>
+ <li><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/Source_cvs.ejs">Source_cvs</a></code> works just like <code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/source.ejs">source</a></code>, except it links to the <a href="/en-US/docs/Mozilla/Developer_guide/Source_Code/CVS">CVS</a> repository instead of the newer <a href="/en-US/docs/Mozilla/Developer_guide/mozilla-central">mozilla-central</a> one.</li>
+ <li><code><a href="https://github.com/mdn/yari/tree/master/kumascript/macros/LXRSearch.ejs">LXRSearch</a></code> can be used to create an LXR search URL.</li>
+</ul>
diff --git a/files/zh-cn/mdn/yari/index.html b/files/zh-cn/mdn/yari/index.html
index c48e06b138..07b623bec6 100644
--- a/files/zh-cn/mdn/yari/index.html
+++ b/files/zh-cn/mdn/yari/index.html
@@ -5,7 +5,6 @@ tags:
- Yari
- Landing
- MDN Meta
-translation_of: MDN/Yari
---
<div>{{MDNSidebar}}</div>
diff --git a/files/zh-cn/web/api/document/execcommand/index.html b/files/zh-cn/web/api/document/execcommand/index.html
index 95624325e6..355a4bd33f 100644
--- a/files/zh-cn/web/api/document/execcommand/index.html
+++ b/files/zh-cn/web/api/document/execcommand/index.html
@@ -138,6 +138,8 @@ translation_of: Web/API/Document/execCommand
该属性已经废弃,使用 styleWithCSS 代替。</dd>
<dt><code>styleWithCSS</code></dt>
<dd>用这个取代 useCSS 命令。 参数如预期的那样工作, i.e. true modifies/generates 风格的标记属性, false 生成格式化元素。</dd>
+ <dt><code>AutoUrlDetect</code></dt>
+ <dd>更改浏览器自动链接行为(仅IE浏览器支持)</dd>
</dl>
<h2 id="示例">示例</h2>
diff --git a/files/zh-cn/web/api/element/after/index.html b/files/zh-cn/web/api/element/after/index.html
new file mode 100644
index 0000000000..ea111ec412
--- /dev/null
+++ b/files/zh-cn/web/api/element/after/index.html
@@ -0,0 +1,91 @@
+---
+title: Element.after()
+slug: Web/API/Element/after
+translation_of: Web/API/Element/after
+original_slug: Web/API/ChildNode/after
+tags:
+ - API
+ - DOM
+ - Method
+ - Node
+ - Reference
+browser-compat: api.Element.after
+---
+<div>{{APIRef("DOM")}}</div>
+
+<p><strong><code>Element.after()</code> </strong>方法会在其父节点的子节点列表中插入一些 {{domxref("Node")}} 或 {{domxref("DOMString")}} 对象。插入位置为该节点之后。{{domxref("DOMString")}} 对象会被以 {{domxref("Text")}} 的形式插入。</p>
+
+<h2 id="Syntax">语法</h2>
+
+<pre class="brush: js">
+after(... nodes)
+</pre>
+
+<h3 id="Parameters">参数</h3>
+
+<dl>
+ <dt><code>nodes</code></dt>
+ <dd>一组准备插入的 {{domxref("Node")}} 或 {{domxref("DOMString")}} 。</dd>
+</dl>
+
+<h3 id="Exceptions">错误</h3>
+
+<ul>
+ <li>{{domxref("HierarchyRequestError")}}: 在某些不正确的层级结构进行了插入操作。</li>
+</ul>
+
+<h2 id="Examples">示例</h2>
+
+<h3 id="Inserting_an_element">插入元素</h3>
+
+<pre class="brush: js">let container = document.createElement("div");
+let p = document.createElement("p");
+container.appendChild(p);
+let span = document.createElement("span");
+
+p.after(span);
+
+console.log(container.outerHTML);
+// "&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;"
+</pre>
+
+<h3 id="Inserting_text">插入文本</h3>
+
+<pre class="brush: js">let container = document.createElement("div");
+let p = document.createElement("p");
+container.appendChild(p);
+
+p.after("Text");
+
+console.log(container.outerHTML);
+// "&lt;div&gt;&lt;p&gt;&lt;/p&gt;Text&lt;/div&gt;"</pre>
+
+<h3 id="Inserting_an_element_and_text">同时插入元素和文本</h3>
+
+<pre class="brush: js">let container = document.createElement("div");
+let p = document.createElement("p");
+container.appendChild(p);
+let span = document.createElement("span");
+
+p.after(span, "Text");
+
+console.log(container.outerHTML);
+// "&lt;div&gt;&lt;p&gt;&lt;/p&gt;&lt;span&gt;&lt;/span&gt;Text&lt;/div&gt;"</pre>
+
+<h2 id="Specifications">规范</h2>
+
+{{Specifications}}
+
+<h2 id="Browser_compatibility">浏览器兼容性</h2>
+
+<p>{{Compat}}</p>
+
+<h2 id="See_also">相关链接</h2>
+
+<ul>
+ <li>{{domxref("Element.before()")}}</li>
+ <li>{{domxref("Element.append()")}}</li>
+ <li>{{domxref("Node.appendChild()")}}</li>
+ <li>{{domxref("Element.insertAdjacentElement()")}}</li>
+ <li>{{domxref("NodeList")}}</li>
+</ul>
diff --git a/files/zh-cn/web/api/element/before/index.html b/files/zh-cn/web/api/element/before/index.html
new file mode 100644
index 0000000000..11553a0194
--- /dev/null
+++ b/files/zh-cn/web/api/element/before/index.html
@@ -0,0 +1,193 @@
+---
+title: Element.before()
+slug: Web/API/Element/before
+tags:
+ - API
+ - DOM
+ - Method
+ - Node
+ - Reference
+translation_of: Web/API/Element/before
+original_slug: Web/API/ChildNode/before
+browser-compat: api.Element.before
+---
+<div>{{APIRef("DOM")}} {{SeeCompatTable}}</div>
+
+<p> <code><strong>ChildNode</strong></code><strong><code>.before</code></strong> 方法可以在<code>ChildNode这个节点的父节点中插入一些列的</code> {{domxref("Node")}} 或者 {{domxref("DOMString")}} 对象,位置就是在<code>ChildNode节点的前面,</code>{{domxref("DOMString")}} 对象其实和 {{domxref("Text")}}节点一样的方式来完成插入的。</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox">[Throws, Unscopable]
+void Element.before((Node or DOMString)... nodes);
+</pre>
+
+<h3 id="Parameters参数">Parameters参数</h3>
+
+<dl>
+ <dt><code>nodes</code></dt>
+ <dd>一系列的 {{domxref("Node")}} 或者 {{domxref("DOMString")}} </dd>
+</dl>
+
+<h3 id="Exceptions">Exceptions</h3>
+
+<ul>
+ <li>{{domxref("HierarchyRequestError")}}: 当节点插入了错误的层级就会出现报错,需要遵循html标签的层级关系,</li>
+</ul>
+
+<h2 id="Examples事例">Examples事例</h2>
+
+<h3 id="Inserting_an_element插入元素节点">Inserting an element插入元素节点</h3>
+
+<pre class="brush: js">var parent = document.createElement("div");
+var child = document.createElement("p");
+parent.appendChild(child);
+var span = document.createElement("span");
+
+child.before(span);
+
+console.log(parent.outerHTML);
+// "&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;"
+</pre>
+
+<h3 id="Inserting_text插入文本节点">Inserting text插入文本节点</h3>
+
+<pre class="brush: js">var parent = document.createElement("div");
+var child = document.createElement("p");
+parent.appendChild(child);
+
+child.before("Text");
+
+console.log(parent.outerHTML);
+// "&lt;div&gt;Text&lt;p&gt;&lt;/p&gt;&lt;/div&gt;"</pre>
+
+<h3 id="Inserting_an_element_and_text同时插入文本和元素">Inserting an element and text同时插入文本和元素</h3>
+
+<pre class="brush: js">var parent = document.createElement("div");
+var child = document.createElement("p");
+parent.appendChild(child);
+var span = document.createElement("span");
+
+child.before(span, "Text");
+
+console.log(parent.outerHTML);
+// "&lt;div&gt;&lt;span&gt;&lt;/span&gt;Text&lt;p&gt;&lt;/p&gt;&lt;/div&gt;"</pre>
+
+<h3 id="Element.before()_is_unscopable不可使用区域"><code>Element.before()</code> is unscopable不可使用区域</h3>
+
+<p>The <code>before()</code> 不能配合with声明使用,See {{jsxref("Symbol.unscopables")}} for more information.</p>
+
+<pre class="brush: js">with(node) {
+ before("foo");
+}
+// ReferenceError: before is not defined </pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<p>兼容ie9或者更高版本的方法,You can polyfill the <code>before() method</code> in Internet Explorer 9 and higher with the following code:</p>
+
+<pre class="brush: js">// from: https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/before()/before().md
+(function (arr) {
+ arr.forEach(function (item) {
+ if (item.hasOwnProperty('before')) {
+ return;
+ }
+ Object.defineProperty(item, 'before', {
+ configurable: true,
+ enumerable: true,
+ writable: true,
+ value: function before() {
+ var argArr = Array.prototype.slice.call(arguments),
+ docFrag = document.createDocumentFragment();
+
+ argArr.forEach(function (argItem) {
+ var isNode = argItem instanceof Node;
+ docFrag.appendChild(isNode ? argItem : document.createTextNode(String(argItem)));
+ });
+
+ this.parentNode.insertBefore(docFrag, this);
+ }
+ });
+ });
+})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);</pre>
+
+<h2 id="Specification">Specification</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('DOM WHATWG', '#dom-childnode-before', 'Element.before()')}}</td>
+ <td>{{Spec2('DOM WHATWG')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatChrome(54.0)}}</td>
+ <td>{{CompatGeckoDesktop(49)}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatOpera(39)}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Android Webview</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ <th>Chrome for Android</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatChrome(54.0)}}</td>
+ <td>{{CompatGeckoMobile(49)}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatOpera(39)}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatChrome(54.0)}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>{{domxref("ChildNode")}} and {{domxref("ParentNode")}}</li>
+ <li>{{domxref("ChildNode.after()")}}</li>
+ <li>{{domxref("ParentNode.append()")}}</li>
+ <li>{{domxref("Node.appendChild()")}}</li>
+ <li>{{domxref("Node.insertBefore()")}}</li>
+ <li>{{domxref("NodeList")}}</li>
+</ul>
diff --git a/files/zh-cn/web/api/element/remove/index.html b/files/zh-cn/web/api/element/remove/index.html
new file mode 100644
index 0000000000..b244385222
--- /dev/null
+++ b/files/zh-cn/web/api/element/remove/index.html
@@ -0,0 +1,98 @@
+---
+
+title: Element.remove()
+slug: Web/API/Element/remove
+tags:
+ - API
+ - Element
+ - DOM
+ - Method
+translation_of: Web/API/Element/remove
+original_slug: Web/API/ChildNode/remove
+browser-compat: api.Element.remove
+---
+<p>{{APIRef("DOM")}}</p>
+
+<p><code><strong>Element.remove()</strong></code> 方法,把对象从它所属的 DOM 树中删除。</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox"><var>node</var>.remove();</pre>
+
+<h2 id="示例">示例</h2>
+
+<h3 id="使用_remove()">使用 <code>remove()</code></h3>
+
+<pre class="brush: html">&lt;div id="div-01"&gt;Here is div-01&lt;/div&gt;
+&lt;div id="div-02"&gt;Here is div-02&lt;/div&gt;
+&lt;div id="div-03"&gt;Here is div-03&lt;/div&gt;
+</pre>
+
+<pre class="brush: js">var el = document.getElementById('div-02');
+el.remove();
+// id 为 'div-02' 的 div 被删掉了
+</pre>
+
+<p>{{EmbedLiveSample('使用_remove()')}}</p>
+
+<h3 id="Element.remove()_是不可见的"><code>Element.remove()</code> 是不可见的</h3>
+
+<p>在 <code>with</code> 语句中,<code>remove()</code> 方法是不可见的。参阅 {{jsxref("Symbol.unscopables")}} 了解更多信息。</p>
+
+<pre class="brush: js">with(node) {
+ remove();
+}
+// ReferenceError: remove is not defined</pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<p>You can polyfill the <code>remove()</code> method in Internet Explorer 9 and higher with the following code:</p>
+
+<pre class="brush: js">//https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/remove()/remove().md
+(function (arr) {
+ arr.forEach(function (item) {
+ if (item.hasOwnProperty('remove')) {
+ return;
+ }
+ Object.defineProperty(item, 'remove', {
+ configurable: true,
+ enumerable: true,
+ writable: true,
+ value: function remove() {
+ this.parentNode.removeChild(this);
+ }
+ });
+ });
+})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);</pre>
+
+<h2 id="Specification" name="Specification">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">规范</th>
+ <th scope="col">状态</th>
+ <th scope="col">注释</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'Element.remove')}}</td>
+ <td>{{Spec2('DOM WHATWG')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+
+
+<p>{{Compat("api.Element.remove")}}</p>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li>{{domxref("ChildNode")}} 纯接口。</li>
+ <li>
+ <div class="syntaxbox">实现此纯接口的对象类型: {{domxref("CharacterData")}}、{{domxref("Element")}} , 和 {{domxref("DocumentType")}}.</div>
+ </li>
+</ul>
diff --git a/files/zh-cn/web/api/element/replacewith/index.html b/files/zh-cn/web/api/element/replacewith/index.html
new file mode 100644
index 0000000000..13fe96c23b
--- /dev/null
+++ b/files/zh-cn/web/api/element/replacewith/index.html
@@ -0,0 +1,116 @@
+---
+title: Element.replaceWith()
+slug: Web/API/Element/replaceWith
+tags:
+ - API
+ - DOM
+ - Method
+ - Element
+ - Reference
+browser-compat: api.Element.replaceWith
+translation_of: Web/API/Element/replaceWith
+original_slug: Web/API/ChildNode/replaceWith
+---
+<div>{{APIRef("DOM")}} {{SeeCompatTable}}</div>
+
+<p><code><strong>ChildNode</strong></code><strong><code>.replaceWith()</code></strong> 的方法用一套 {{domxref("Node")}} 对象或者 {{domxref("DOMString")}} 对象,替换了该节点父节点下的子节点 。{{domxref("DOMString")}} 对象被当做等效的{{domxref("Text")}} 节点插入。</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox">[Throws, Unscopable]
+void ChildNode.replaceWith((Node or DOMString)... nodes);
+</pre>
+
+<h3 id="参数">参数</h3>
+
+<dl>
+ <dt><code>节点</code></dt>
+ <dd>一系列用来替换的{{domxref("Node")}} 对象或者 {{domxref("DOMString")}} 对象。</dd>
+</dl>
+
+<h3 id="例外">例外</h3>
+
+<ul>
+ <li>{{domxref("HierarchyRequestError")}}: 无法在层次结构中的指定点插入节点。</li>
+</ul>
+
+<h2 id="案例">案例</h2>
+
+<h3 id="Using_replaceWith">Using <code>replaceWith()</code></h3>
+
+<pre class="brush: js">var parent = document.createElement("div");
+var child = document.createElement("p");
+parent.appendChild(child);
+var span = document.createElement("span");
+
+child.replaceWith(span);
+
+console.log(parent.outerHTML);
+// "&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;"
+</pre>
+
+<h3 id="ChildNode.replaceWith_is_unscopable"><code>ChildNode.replaceWith()</code> is unscopable</h3>
+
+<p><code>replaceWith()</code>的方法并没有作用于with语句. 参考 {{jsxref("Symbol.unscopables")}} 获取更多信息.</p>
+
+<pre class="brush: js">with(node) {
+ replaceWith("foo");
+}
+// ReferenceError: replaceWith is not defined </pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<p>你可以在IE9及更高级的浏览器中使用下面的代码向上兼容<code>replaceWith()</code>的方法:</p>
+
+<pre class="brush: js">(function (arr) {
+ arr.forEach(function (item) {
+ if (item.hasOwnProperty('replaceWith')) {
+ return;
+ }
+ Object.defineProperty(item, 'replaceWith', {
+ configurable: true,
+ enumerable: true,
+ writable: true,
+ value: function replaceWith() {
+ var argArr = Array.prototype.slice.call(arguments),
+ docFrag = document.createDocumentFragment();
+
+ argArr.forEach(function (argItem) {
+ var isNode = argItem instanceof Node;
+ docFrag.appendChild(isNode ? argItem : document.createTextNode(String(argItem)));
+ });
+
+ this.parentNode.replaceChild(docFrag, this);
+ }
+ });
+ });
+})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">规范</th>
+ <th scope="col">状态</th>
+ <th scope="col">注释</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('DOM WHATWG', '#dom-childnode-replacewith', 'ChildNode.replacewith()')}}</td>
+ <td>{{Spec2('DOM WHATWG')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p>{{Compat("api.ChildNode.replaceWith")}}</p>
+
+<h2 id="参阅">参阅</h2>
+
+<ul>
+ <li>{{domxref("ChildNode")}} 和 {{domxref("ParentNode")}}</li>
+ <li>{{domxref("Node.replaceChild()")}}</li>
+ <li>{{domxref("NodeList")}}</li>
+</ul>
diff --git a/files/zh-cn/web/api/fetch_api/using_fetch/index.html b/files/zh-cn/web/api/fetch_api/using_fetch/index.html
index d08d605958..2aef1ba300 100644
--- a/files/zh-cn/web/api/fetch_api/using_fetch/index.html
+++ b/files/zh-cn/web/api/fetch_api/using_fetch/index.html
@@ -157,7 +157,7 @@ fetch('https://example.com/posts', {
<h3 id="检测请求是否成功">检测请求是否成功</h3>
-<p>如果遇到网络故障,{{domxref("GlobalFetch.fetch","fetch()")}} promise 将会 reject,带上一个 {{jsxref("TypeError")}} 对象。虽然这个情况经常是遇到了权限问题或类似问题——比如 404 不是一个网络故障。想要精确的判断 <code>fetch()</code> 是否成功,需要包含 promise resolved 的情况,此时再判断 {{domxref("Response.ok")}} 是不是为 true。类似以下代码:</p>
+<p>如果遇到网络故障或服务端的 CORS 配置错误时,{{domxref("GlobalFetch.fetch","fetch()")}} promise 将会 reject,带上一个 {{jsxref("TypeError")}} 对象。虽然这个情况经常是遇到了权限问题或类似问题——比如 404 不是一个网络故障。想要精确的判断 <code>fetch()</code> 是否成功,需要包含 promise resolved 的情况,此时再判断 {{domxref("Response.ok")}} 是不是为 true。类似以下代码:</p>
<pre class="brush: js notranslate">fetch('flowers.jpg').then(function(response) {
if(response.ok) {
diff --git a/files/zh-cn/web/api/renderingcontext/index.html b/files/zh-cn/web/api/renderingcontext/index.html
new file mode 100644
index 0000000000..4cf1dfc0b7
--- /dev/null
+++ b/files/zh-cn/web/api/renderingcontext/index.html
@@ -0,0 +1,30 @@
+---
+title: RenderingContext
+slug: Web/API/RenderingContext
+translation_of: Web/API/RenderingContext
+original_slug: Web/API/RenderingContext
+---
+<p>{{APIRef("Canvas API")}}</p>
+
+<p><code><strong>RenderingContext</strong></code> 是一个辅助类型,描述下面任何一个渲染上下文:  {{domxref("CanvasRenderingContext2D")}}, {{domxref("WebGLRenderingContext")}} 或者 {{domxref("WebGL2RenderingContext")}} (继承自 <code>WebGLRenderingContext</code>)。</p>
+
+<p>这是简化规范的辅助类型,它不是一个接口,也没有对象实现它。</p>
+
+<h2 id="规范描述">规范描述</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', "scripting.html#renderingcontext", "RenderingContext")}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<p> </p> \ No newline at end of file
diff --git a/files/zh-cn/web/api/web_workers_api/index.html b/files/zh-cn/web/api/web_workers_api/index.html
index d9ee40bbaa..ffc27215d7 100644
--- a/files/zh-cn/web/api/web_workers_api/index.html
+++ b/files/zh-cn/web/api/web_workers_api/index.html
@@ -18,7 +18,7 @@ translation_of: Web/API/Web_Workers_API
<p>使用构造函数(例如,{{domxref("Worker.Worker", "Worker()")}})创建一个<strong> worker</strong> 对象, 构造函数接受一个 JavaScript文件URL — 这个文件包含了将在 worker 线程中运行的代码。worker 将运行在与当前 {{domxref("window")}}不同的另一个全局上下文中,这个上下文由一个对象表示,标准情况下为{{domxref("DedicatedWorkerGlobalScope")}} (标准 workers 由单个脚本使用; 共享workers使用{{domxref("SharedWorkerGlobalScope")}})。</p>
-<p>你可以在worker 线程中运行任意的代码,但注意存在一些例外:直接在 worker 线程中操纵 DOM 元素;或使用{{domxref("window")}} 对象中的某些方法和属性。大部分 window 对象的方法和属性是可以使用的,包括 <a href="/en-US/docs/WebSockets">WebSockets</a>,以及诸如 <a href="/en-US/docs/Web/API/IndexedDB_API">IndexedDB</a> 和 FireFox OS 中独有的 <a href="/en-US/docs/Web/API/Data_Store_API">Data Store API</a> 这一类数据存储机制。更多信息请参见: <a href="/en-US/docs/Web/API/Worker/Functions_and_classes_available_to_workers">Functions and classes available to workers</a> 。</p>
+<p>你可以在worker 线程中运行任意的代码,但注意存在一些例外:你不能直接在 worker 线程中操纵 DOM 元素;或使用{{domxref("window")}} 对象中的某些方法和属性。大部分 window 对象的方法和属性是可以使用的,包括 <a href="/en-US/docs/WebSockets">WebSockets</a>,以及诸如 <a href="/en-US/docs/Web/API/IndexedDB_API">IndexedDB</a> 和 FireFox OS 中独有的 <a href="/en-US/docs/Web/API/Data_Store_API">Data Store API</a> 这一类数据存储机制。更多信息请参见: <a href="/en-US/docs/Web/API/Worker/Functions_and_classes_available_to_workers">Functions and classes available to workers</a> 。</p>
<p>主线程和 worker 线程相互之间使用 <code>postMessage()</code> 方法来发送信息, 并且通过 <code>onmessage</code> 这个 event handler来接收信息(传递的信息包含在 {{event("Message")}} 这个事件的<code>data</code>属性内) 。数据的交互方式为传递副本,而不是直接共享数据。</p>
diff --git a/files/zh-cn/web/api/web_workers_api/structured_clone_algorithm/index.html b/files/zh-cn/web/api/web_workers_api/structured_clone_algorithm/index.html
index 29bd42fc24..2206042e4b 100644
--- a/files/zh-cn/web/api/web_workers_api/structured_clone_algorithm/index.html
+++ b/files/zh-cn/web/api/web_workers_api/structured_clone_algorithm/index.html
@@ -14,7 +14,7 @@ original_slug: Web/Guide/API/DOM/The_structured_clone_algorithm
<ul>
<li><code><a href="/cn/JavaScript/Reference/Global_Objects/Error">Error</a></code> 以及 <code><a href="/cn/JavaScript/Reference/Global_Objects/Function">Function</a></code> 对象是不能被结构化克隆算法复制的;如果你尝试这样子去做,这会导致抛出 <code>DATA_CLONE_ERR</code> 的异常。</li>
- <li>企图去克隆 DOM 节点同样会抛出 <code>DATA_CLONE_ERROR</code> 异常。</li>
+ <li>企图去克隆 DOM 节点同样会抛出 <code>DATA_CLONE_ERR</code> 异常。</li>
<li>对象的某些特定参数也不会被保留
<ul>
<li><code><a href="/cn/JavaScript/Reference/Global_Objects/RegExp">RegExp</a> </code>对象的 <code>lastIndex</code> 字段不会被保留</li>
diff --git a/files/zh-cn/web/api/window/requestidlecallback/index.html b/files/zh-cn/web/api/window/requestidlecallback/index.html
index 0632e3a3ce..667133cf18 100644
--- a/files/zh-cn/web/api/window/requestidlecallback/index.html
+++ b/files/zh-cn/web/api/window/requestidlecallback/index.html
@@ -35,7 +35,7 @@ translation_of: Web/API/Window/requestIdleCallback
<dt><code>options</code> {{optional_inline}}</dt>
<dd>包括可选的配置参数。具有如下属性:
<ul>
- <li><code>timeout</code>:如果指定了timeout并具有一个正值,并且尚未通过超时毫秒数调用回调,那么回调会在下一次空闲时期被强制执行,尽管这样很可能会对性能造成负面影响。</li>
+ <li><code>timeout</code>: 如果指定了timeout,并且有一个正值,而回调在timeout毫秒过后还没有被调用,那么回调任务将放入事件循环中排队,即使这样做有可能对性能产生负面影响。</li>
</ul>
</dd>
</dl>
diff --git a/files/zh-cn/web/css/vertical-align/index.html b/files/zh-cn/web/css/vertical-align/index.html
index df895fe1cb..eacb94adfc 100644
--- a/files/zh-cn/web/css/vertical-align/index.html
+++ b/files/zh-cn/web/css/vertical-align/index.html
@@ -18,7 +18,7 @@ translation_of: Web/CSS/vertical-align
<p>vertical-align属性可被用于两种环境:</p>
<ul>
- <li>使行内元素盒模型与其行内元素容器垂直对齐。例如,用于垂直对齐一行文本的内的图片{{HTMLElement("img")}}:</li>
+ <li>使行内元素盒模型与其行内元素容器垂直对齐。例如,用于垂直对齐一行文本内的图片{{HTMLElement("img")}}:</li>
</ul>
<div id="vertical-align-inline">
diff --git a/files/zh-cn/web/html/element/input/checkbox/index.html b/files/zh-cn/web/html/element/input/checkbox/index.html
index 14a0d21aef..4f349c2449 100644
--- a/files/zh-cn/web/html/element/input/checkbox/index.html
+++ b/files/zh-cn/web/html/element/input/checkbox/index.html
@@ -25,7 +25,7 @@ translation_of: Web/HTML/Element/input/checkbox
<dd>指定checkbox处于不定状态(在大多数平台,这样会产生一个划过checkbox的横线)。</dd>
</dl>
-<h2 id="示例">示例</h2>
+<h2 id="Example">示例</h2>
<pre class="brush: html">&lt;p&gt;
&lt;input type="checkbox" id="cbox1" value="first_checkbox"&gt;
diff --git a/files/zh-cn/web/javascript/reference/global_objects/encodeuricomponent/index.html b/files/zh-cn/web/javascript/reference/global_objects/encodeuricomponent/index.html
index be7f03a446..dc3f9a00a2 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/encodeuricomponent/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/encodeuricomponent/index.html
@@ -89,7 +89,7 @@ console.log(header);
function encodeRFC5987ValueChars (str) {
    return encodeURIComponent(str).
- // 注意,仅管 RFC3986 保留 "!",但 RFC5987 并没有
+ // 注意,尽管 RFC3986 保留 "!",但 RFC5987 并没有
// 所以我们并不需要过滤它
        replace(/['()]/g, escape). // i.e., %27 %28 %29
        replace(/\*/g, '%2A').
diff --git a/files/zh-cn/web/javascript/reference/strict_mode/index.html b/files/zh-cn/web/javascript/reference/strict_mode/index.html
index 4f48146e49..0d9066e644 100644
--- a/files/zh-cn/web/javascript/reference/strict_mode/index.html
+++ b/files/zh-cn/web/javascript/reference/strict_mode/index.html
@@ -11,7 +11,7 @@ translation_of: Web/JavaScript/Reference/Strict_mode
<div class="note">有时你会看到非严格模式,被称为“<strong><a href="https://developer.mozilla.org/docs/Glossary/Sloppy_mode" id="sloppyModeId333">sloppy mode</a></strong>”。这不是一个官方术语,但以防万一,你应该意识到这一点。</div>
-<div><a class="external" href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">ECMAScript 5</a>的<strong>严格模式</strong>是采用具有限制性JavaScript变体的一种方式,从而使代码显示地 脱离“马虎模式/稀松模式/懒散模式“(sloppy)模式。</div>
+<div><a class="external" href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">ECMAScript 5</a>的<strong>严格模式</strong>是采用具有限制性JavaScript变体的一种方式,从而使代码隐式地脱离“马虎模式/稀松模式/懒散模式“(sloppy)模式。</div>
<div>严格模式不仅仅是一个子集:它的产生是为了形成与正常代码不同的语义。</div>
diff --git a/files/zh-cn/web/security/weak_signature_algorithm/index.html b/files/zh-cn/web/security/weak_signature_algorithm/index.html
new file mode 100644
index 0000000000..1b3963f2ec
--- /dev/null
+++ b/files/zh-cn/web/security/weak_signature_algorithm/index.html
@@ -0,0 +1,32 @@
+---
+title: 弱签名算法
+slug: Web/Security/Weak_Signature_Algorithm
+tags:
+ - Cryptography
+ - Guide
+ - Security
+ - 密码学
+ - 指南
+ - 安全
+translation_of: Web/Security/Weak_Signature_Algorithm
+---
+
+<p><span class="seoSummary">在给{{Glossary("Digital certificate", "数字证书")}}{{Glossary("Signature/Security", "签名")}}时,用到的哈希算法的强度对证书的安全性至关重要。本文将提供一些已知的弱签名算法的信息,以便你在适当的时候避免使用它们。</span></p>
+
+<p>弱的哈希算法可以使攻击者能够伪造证书。技术进步使网络攻击变得更加可行,随着新型的网络攻击不断被发现,我们不鼓励使用旧的算法,并最终移除了对它们的支持。</p>
+
+<h2 id="SHA-1">SHA-1</h2>
+
+<p>从 2017 年开始,主流浏览器不再认为 SHA-1 证书安全。应该使用那些采用更安全的哈希算法(如 SHA-256 或 SHA-512)的证书。</p>
+
+<h2 id="MD5">MD5</h2>
+
+<p>对基于 MD5 的签名的支持在 2012 年初被移除。</p>
+
+<h2 id="See_also">相关资料</h2>
+
+<ul>
+ <li><a href="https://blog.mozilla.org/security/2014/09/23/phasing-out-certificates-with-sha-1-based-signature-algorithms/">Mozilla Security Blog 关于弃用 SHA-1 的文章</a></li>
+</ul>
+
+<p>{{QuickLinksWithSubpages("/zh-CN/docs/Web/Security")}}</p> \ No newline at end of file