aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/generator
diff options
context:
space:
mode:
authort7yang <t7yang@gmail.com>2022-01-10 08:38:07 +0800
committerIrvin <irvinfly@gmail.com>2022-02-16 02:35:54 +0800
commitc40612041809fe289aba58aefa170bbe784aba1f (patch)
tree8ca89b071d04afcf7abd6d9a04d0765a041d9c8a /files/zh-cn/web/javascript/reference/global_objects/generator
parent12a899ab8540bc84f56a0dc6491be80a48499d49 (diff)
downloadtranslated-content-c40612041809fe289aba58aefa170bbe784aba1f.tar.gz
translated-content-c40612041809fe289aba58aefa170bbe784aba1f.tar.bz2
translated-content-c40612041809fe289aba58aefa170bbe784aba1f.zip
remove name attribute for zh-CN
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/generator')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/generator/index.html2
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/generator/next/index.html12
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/generator/return/index.html12
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/generator/throw/index.html10
4 files changed, 18 insertions, 18 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/generator/index.html b/files/zh-cn/web/javascript/reference/global_objects/generator/index.html
index 9efc414db4..b3b016d83a 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/generator/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/generator/index.html
@@ -117,7 +117,7 @@ console.log(it.next()); // throws StopIteration (as the generator is now close
<p>{{Compat("javascript.builtins.Generator")}}</p>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<h3 id="Legacy_generators">Legacy generators</h3>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/generator/next/index.html b/files/zh-cn/web/javascript/reference/global_objects/generator/next/index.html
index e135b75afc..63d7f9a169 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/generator/next/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/generator/next/index.html
@@ -15,11 +15,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Generator/next
<p><code><strong>next</strong></code><strong><code>()</code></strong> 方法返回一个包含属性 <code>done</code> 和 <code>value</code> 的对象。该方法也可以通过接受一个参数用以向生成器传值。</p>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"><code><var>gen</var>.next(value)</code></pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>value</code></dt>
@@ -43,7 +43,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Generator/next
<h2 id="示例">示例</h2>
-<h3 id="Example_Using_test" name="Example:_Using_test">使用 <code>next()方法</code></h3>
+<h3 id="Example_Using_test">使用 <code>next()方法</code></h3>
<p>下面的例子展示了一个简单的生成器, 以及调用 <code>next</code> 后方法的返回值:</p>
@@ -79,7 +79,7 @@ g.next(2);
// "{ value: null, done: false }"</code>
</pre>
-<h2 id="Specifications" name="Specifications">规范</h2>
+<h2 id="Specifications">规范</h2>
<table class="standard-table">
<tbody>
@@ -101,7 +101,7 @@ g.next(2);
</tbody>
</table>
-<h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容性</h2>
+<h2 id="Browser_compatibility">浏览器兼容性</h2>
<div>{{CompatibilityTable}}</div>
@@ -157,7 +157,7 @@ g.next(2);
</div>
</div>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li><code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/function*">function*</a></code></li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/generator/return/index.html b/files/zh-cn/web/javascript/reference/global_objects/generator/return/index.html
index 9c5ed4bb99..835495303e 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/generator/return/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/generator/return/index.html
@@ -14,11 +14,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Generator/return
<p><code><strong>return</strong></code><strong><code>()</code></strong> 方法返回给定的值并结束生成器。</p>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"><code><var>gen</var>.return(value)</code></pre>
-<h3 id="Parameters" name="Parameters">参数</h3>
+<h3 id="Parameters">参数</h3>
<dl>
<dt><code>value</code></dt>
@@ -31,7 +31,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Generator/return
<h2 id="示例">示例</h2>
-<h3 id="Example_Using_test" name="Example:_Using_test">使用 <code>return()</code></h3>
+<h3 id="Example_Using_test">使用 <code>return()</code></h3>
<p>以下例子展示了一个简单的生成器和 <code>return</code> 方法的使用.</p>
@@ -64,7 +64,7 @@ g.next(); // { value: undefined, done: true }
g.return(); // { value: undefined, done: true }
g.return(1); // { value: 1, done: true }</pre>
-<h2 id="Specifications" name="Specifications">规范</h2>
+<h2 id="Specifications">规范</h2>
<table class="standard-table">
<tbody>
@@ -86,13 +86,13 @@ g.return(1); // { value: 1, done: true }</pre>
</tbody>
</table>
-<h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容性</h2>
+<h2 id="Browser_compatibility">浏览器兼容性</h2>
<p>{{Compat("javascript.builtins.Generator.return")}}</p>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li><code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/function*">function*</a></code></li>
diff --git a/files/zh-cn/web/javascript/reference/global_objects/generator/throw/index.html b/files/zh-cn/web/javascript/reference/global_objects/generator/throw/index.html
index 19b2623a88..63afc5f965 100644
--- a/files/zh-cn/web/javascript/reference/global_objects/generator/throw/index.html
+++ b/files/zh-cn/web/javascript/reference/global_objects/generator/throw/index.html
@@ -14,7 +14,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Generator/throw
<p><code><strong>throw</strong></code><strong><code>()</code></strong> 方法用来向生成器抛出异常,并恢复生成器的执行,返回带有 <code>done</code> 及 <code>value</code> 两个属性的对象。</p>
-<h2 id="Syntax" name="Syntax">语法</h2>
+<h2 id="Syntax">语法</h2>
<pre class="syntaxbox"><code><var>gen</var>.throw(exception)</code></pre>
@@ -42,7 +42,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Generator/throw
<h2 id="示例">示例</h2>
-<h3 id="Example:_Using_test" name="Example:_Using_test">使用 <code>throw()</code></h3>
+<h3 id="Example:_Using_test">使用 <code>throw()</code></h3>
<p>下面的例子展示了一个简单的生成器并使用 throw方法向该生成器抛出一个异常,该异常通常可以通过 <code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/try...catch">try...catch</a></code> 块进行捕获.</p>
@@ -61,7 +61,7 @@ g.next(); // { value: 42, done: false }
g.throw(new Error("Something went wrong")); // "Error caught!"
</pre>
-<h2 id="Specifications" name="Specifications">规范</h2>
+<h2 id="Specifications">规范</h2>
<table class="standard-table">
<tbody>
@@ -83,7 +83,7 @@ g.throw(new Error("Something went wrong")); // "Error caught!"
</tbody>
</table>
-<h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容性</h2>
+<h2 id="Browser_compatibility">浏览器兼容性</h2>
<div>{{CompatibilityTable}}</div>
@@ -135,7 +135,7 @@ g.throw(new Error("Something went wrong")); // "Error caught!"
</table>
</div>
-<h2 id="See_also" name="See_also">相关链接</h2>
+<h2 id="See_also">相关链接</h2>
<ul>
<li><code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/function*">function*</a></code></li>