From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/domerror/index.html | 212 ++++++++++++++++++++++++++++++++ 1 file changed, 212 insertions(+) create mode 100644 files/zh-cn/web/api/domerror/index.html (limited to 'files/zh-cn/web/api/domerror') 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 +--- +

{{ APIRef("DOM") }}{{deprecated_header}}

+ +

 DOMError 接口描述一个错误对象,该对象包含一个错误的名字。

+ +

属性

+ +
+
{{domxref("DOMError.name")}} {{readOnlyInline}}
+
返回一个代表一个错误类型名称的 {{ domxref("DOMString") }} (见下文).
+
{{domxref("DOMError.message")}} {{readOnlyInline}}
+
返回一个代表与给定错误类型名称有关的信息或描述{{ domxref("DOMString") }}
+
+ +

Error 类型

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeDescription
IndexSizeErrorThe index is not in the allowed range (e.g. thrown in a {{ domxref("range") }} object).
+ 索引不在允许的范围内
HierarchyRequestErrorThe node tree hierarchy is not correct.
+ 节点树层次结构是不正确的。
WrongDocumentErrorThe object is in the wrong {{ domxref("document") }}.
+ 对象是错误的
InvalidCharacterErrorThe string contains invalid characters.
+ 字符串包含无效字符。
NoModificationAllowedErrorThe object can not be modified.
+ 对象不能被修改。
NotFoundErrorThe object can not be found here.
+ 对象不能在这里被找到。
NotSupportedErrorThe operation is not supported
+ 不支持的操作
InvalidStateErrorThe object is in an invalid state.
+ 对象是一个无效的状态。
SyntaxErrorThe string did not match the expected pattern.
+ 字符串不匹配预期的模式
InvalidModificationErrorThe object can not be modified in this way.
+ 对象不能以这种方式被修改
NamespaceErrorThe operation is not allowed by Namespaces in XML
+ 操作在XML命名空间内是不被允许的
InvalidAccessErrorThe object does not support the operation or argument.
+ 对象不支持这种操作或参数。
TypeMismatchErrorThe type of the object does not match the expected type.
+ 对象的类型不匹配预期的类型。
SecurityErrorThe operation is insecure.
+ 此操作是不安全的。
NetworkErrorA network error occurred.
+ 发生网络错误
AbortErrorThe operation was aborted.
+ 操作被中止
URLMismatchErrorThe given URL does not match another URL.
+ 给定的URL不匹配另一个URL。
QuotaExceededErrorThe quota has been exceeded.
+ 已经超过给定配额。
TimeoutErrorThe operation timed out.
+ 操作超时。
InvalidNodeTypeErrorThe node is incorrect or has an incorrect ancestor for this operation.
+ 这个操作的 节点或节点祖先 是不正确的
DataCloneErrorThe object can not be cloned.
+ 对象不能克隆。
+ +

规范

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('DOM4', '#interface-domerror', 'DOMError')}}{{Spec2('DOM4')}}Initial definition.
+ +

浏览器兼容性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatUnknown}}{{CompatVersionUnknown}}12.0[1]{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatVersionUnknown}}12.0[1]{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

[1] 这在Firefox version 58被删除.

+ +

另请参阅

+ + -- cgit v1.2.3-54-g00ecf