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

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

@@ -27,16 +27,16 @@
<h2 id="示例">示例</h2>
<h3 id="禁止表达式检查">禁止表达式检查</h3>
<p>下面代码会抛出一个 <a href="Reference/Global_Objects/TypeError" title="TypeError类型错误 对象用来表示值的类型非预期类型时发生的错误。"><code>TypeError</code></a></p>
<pre class="brush: js">"/bar/".startsWith(/bar/);
<pre><code class="language-javascript">"/bar/".startsWith(/bar/);
// Throws TypeError, 因为 /bar/ 是一个正则表达式
// 且 Symbol.match 没有修改。</pre>
// 且 Symbol.match 没有修改。</code></pre>
<p>但是,如果你将 <code>Symbol.match</code> 置为 <code>false使用 match 属性的</code>表达式检查会认为该象不是正则表达式对象。<code>startsWith</code><code>endsWith</code> 方法将不会抛出 <code>TypeError</code></p>
<pre class="brush: js">var re = /foo/;
<pre><code class="language-javascript">var re = /foo/;
re[Symbol.match] = false;
"/foo/".startsWith(re); // true
"/baz/".endsWith(re); // false
</pre>
</code></pre>
<h2 id="规范">规范</h2>
<table class="standard-table">
<tbody>