DOM - DOM Exception

About

Code - Exception (Try, Catch, Finally statement) in the DOM.

Example

To throw a TimeoutError exception, a user agent would construct a DOMException object whose type was the string “TimeoutError” (and whose code was the number 23, for legacy reasons) and actually throw that object as an exception.

Types

They are all defined in the DOM specification.

Error Number Description
1 IndexSizeError
3 HierarchyRequestError
4 WrongDocumentError
5 InvalidCharacterError
7 NoModificationAllowedError
8 NotFoundError
9 NotSupportedError
11 InvalidStateError
12 SyntaxError
13 InvalidModificationError
14 NamespaceError
15 InvalidAccessError
18 SecurityError
19 NetworkError
20 AbortError
21 URLMismatchError
22 QuotaExceededError
23 TimeoutError
24 InvalidNodeTypeError
25 DataCloneError





Discover More
DOM - API

The DOM API is a specification that specifies all classes and function to manipulate the DOM tree. The DOM API is present natively in browser and may be implemented via a library in other application/environment....



Share this page:
Follow us:
Task Runner