语法高亮,滚动条美化,设置页面调整

This commit is contained in:
fofolee
2019-04-19 02:41:09 +08:00
parent 1e8f76c000
commit 359d29ee0b
1590 changed files with 12328 additions and 11441 deletions

View File

@@ -6,11 +6,11 @@
<p>JavaScript 1.7是一个引出了一些新特性的语言更新尤其是generatoriterator数组推导式 <code>let</code> 表达式和解构赋值。</p>
<h2 id="使用_JavaScript_1.7">使用 JavaScript 1.7</h2>
<p>为了使用 JavaScript 1.7的一些新特性,你需要明确指出你希望使用 JavaScript 1.7。在HTML 或XUL code中使用</p>
<pre class="brush: html"><code>&lt;script type="application/javascript;version=1.7"&gt;&lt;/script&gt;</code>
</pre>
<pre><code class="language-html"><code>&lt;script type="application/javascript;version=1.7"&gt;&lt;/script&gt;</code>
</code></pre>
<p>当使用 <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Introduction_to_the_JavaScript_shell" title="en-US/docs/Introduction_to_the_JavaScript_shell">JavaScript shell</a>的时候,你需要用 <code>-version 170</code> 开启命令行或者用<code>version()</code> 函数来设置你想使用的JavaScript版本。</p>
<pre class="brush:js">version(170);
</pre>
<pre><code class="language-js">version(170);
</code></pre>
<p>你需要指定1.7版本来使用新的“yield”和“let”关键字因为现存的代码可能用它们当变量或者函数名用。没有涉及到新关键词的特性比如解构赋值和数组推导式可以直接使用而不需要指明JavaScript版本。</p>
<h2 id="JavaScript_1.7的新特性">JavaScript 1.7的新特性</h2>
<p>以下JavaScript 1.7的新特性目前还不是ECMA-262标准的一部分。在最近的Firefox版本中会根据ECMAScipt6中的描述来实现这些功能。具体内容见这些参考页面。</p>