aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/domerror
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/domerror
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/domerror')
-rw-r--r--files/zh-cn/web/api/domerror/index.html212
1 files changed, 212 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/domerror/index.html b/files/zh-cn/web/api/domerror/index.html
new file mode 100644
index 0000000000..5d5df14e5f
--- /dev/null
+++ b/files/zh-cn/web/api/domerror/index.html
@@ -0,0 +1,212 @@
+---
+title: DOMError
+slug: Web/API/DOMError
+translation_of: Web/API/DOMError
+---
+<p>{{ APIRef("DOM") }}{{deprecated_header}}</p>
+
+<p> <strong><code>DOMError</code></strong> 接口描述一个错误对象,该对象包含一个错误的名字。</p>
+
+<h2 id="属性">属性</h2>
+
+<dl>
+ <dt>{{domxref("DOMError.name")}} {{readOnlyInline}}</dt>
+ <dd>返回一个代表一个错误类型名称的 {{ domxref("DOMString") }} (见下文).</dd>
+ <dt>{{domxref("DOMError.message")}} {{readOnlyInline}}</dt>
+ <dd>返回一个代表与给定错误类型名称有关的信息或描述{{ domxref("DOMString") }}</dd>
+</dl>
+
+<h2 id="Error_类型">Error 类型</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <td>Type</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><code>IndexSizeError</code></td>
+ <td>The index is not in the allowed range (e.g. thrown in a {{ domxref("range") }} object).<br>
+ 索引不在允许的范围内</td>
+ </tr>
+ <tr>
+ <td><code>HierarchyRequestError</code></td>
+ <td>The node tree hierarchy is not correct.<br>
+ 节点树层次结构是不正确的。</td>
+ </tr>
+ <tr>
+ <td><code>WrongDocumentError</code></td>
+ <td>The object is in the wrong {{ domxref("document") }}.<br>
+ 对象是错误的</td>
+ </tr>
+ <tr>
+ <td><code>InvalidCharacterError</code></td>
+ <td>The string contains invalid characters.<br>
+ 字符串包含无效字符。</td>
+ </tr>
+ <tr>
+ <td><code>NoModificationAllowedError</code></td>
+ <td>The object can not be modified.<br>
+ 对象不能被修改。</td>
+ </tr>
+ <tr>
+ <td><code>NotFoundError</code></td>
+ <td>The object can not be found here.<br>
+ 对象不能在这里被找到。</td>
+ </tr>
+ <tr>
+ <td><code>NotSupportedError</code></td>
+ <td>The operation is not supported<br>
+ 不支持的操作</td>
+ </tr>
+ <tr>
+ <td><code>InvalidStateError</code></td>
+ <td>The object is in an invalid state.<br>
+ 对象是一个无效的状态。</td>
+ </tr>
+ <tr>
+ <td><code>SyntaxError</code></td>
+ <td>The string did not match the expected pattern.<br>
+ 字符串不匹配预期的模式</td>
+ </tr>
+ <tr>
+ <td><code>InvalidModificationError</code></td>
+ <td>The object can not be modified in this way.<br>
+ 对象不能以这种方式被修改</td>
+ </tr>
+ <tr>
+ <td><code>NamespaceError</code></td>
+ <td>The operation is not allowed by Namespaces in XML<br>
+ 操作在XML命名空间内是不被允许的</td>
+ </tr>
+ <tr>
+ <td><code>InvalidAccessError</code></td>
+ <td>The object does not support the operation or argument.<br>
+ 对象不支持这种操作或参数。</td>
+ </tr>
+ <tr>
+ <td><code>TypeMismatchError</code></td>
+ <td>The type of the object does not match the expected type.<br>
+ 对象的类型不匹配预期的类型。</td>
+ </tr>
+ <tr>
+ <td><code>SecurityError</code></td>
+ <td>The operation is insecure.<br>
+ 此操作是不安全的。</td>
+ </tr>
+ <tr>
+ <td><code>NetworkError</code></td>
+ <td>A network error occurred.<br>
+ 发生网络错误</td>
+ </tr>
+ <tr>
+ <td><code>AbortError</code></td>
+ <td>The operation was aborted.<br>
+ 操作被中止</td>
+ </tr>
+ <tr>
+ <td><code>URLMismatchError</code></td>
+ <td>The given URL does not match another URL.<br>
+ 给定的URL不匹配另一个URL。</td>
+ </tr>
+ <tr>
+ <td><code>QuotaExceededError</code></td>
+ <td>The quota has been exceeded.<br>
+ 已经超过给定配额。</td>
+ </tr>
+ <tr>
+ <td><code>TimeoutError</code></td>
+ <td>The operation timed out.<br>
+ 操作超时。</td>
+ </tr>
+ <tr>
+ <td><code>InvalidNodeTypeError</code></td>
+ <td>The node is incorrect or has an incorrect ancestor for this operation.<br>
+ 这个操作的 节点或节点祖先 是不正确的</td>
+ </tr>
+ <tr>
+ <td><code>DataCloneError</code></td>
+ <td>The object can not be cloned.<br>
+ 对象不能克隆。</td>
+ </tr>
+ </tbody>
+</table>
+
+<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('DOM4', '#interface-domerror', 'DOMError')}}</td>
+ <td>{{Spec2('DOM4')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Edge</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>12.0<sup>[1]</sup></td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Edge</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>12.0<sup>[1]</sup></td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<p>[1] 这在Firefox version 58被删除.</p>
+
+<h2 id="另请参阅">另请参阅</h2>
+
+<ul>
+ <li>{{ domxref("DOMException") }}</li>
+</ul>