Name
DOMException — an exception thrown by a Web API
Synopsis
Most client-side JavaScript APIs throw DOMException objects
when they need to signal an error. The code and name properties of the object provide more
details about the error. Note that a DOMException can be thrown when
reading or writing a property of an object as well as when calling a
method of an object.
DOMException is not a subclass of the core JavaScript Error
type, but it functions like one, and some browsers include a
message property for
compatibility with Error.
Constants
unsigned shortINDEX_SIZE_ERR= 1unsigned shortHIERARCHY_REQUEST_ERR= 3unsigned shortWRONG_DOCUMENT_ERR= 4unsigned shortINVALID_CHARACTER_ERR= 5unsigned shortNO_MODIFICATION_ALLOWED_ERR= 7unsigned shortNOT_FOUND_ERR= 8unsigned shortNOT_SUPPORTED_ERR= 9unsigned shortINVALID_STATE_ERR= 11unsigned shortSYNTAX_ERR= 12unsigned shortINVALID_MODIFICATION_ERR= 13unsigned shortNAMESPACE_ERR= 14unsigned shortINVALID_ACCESS_ERR= 15unsigned shortTYPE_MISMATCH_ERR= 17unsigned shortSECURITY_ERR= 18unsigned shortNETWORK_ERR= 19unsigned shortABORT_ERR= 20unsigned shortURL_MISMATCH_ERR= 21unsigned shortQUOTA_EXCEEDED_ERR= 22unsigned shortTIMEOUT_ERR= 23unsigned shortDATA_CLONE_ERR= 25These are the possible values of the
codeproperty. The constant names are verbose enough to indicate the approximate reason that the exception was thrown.
Properties
unsigned shortcodeOne of the constant values listed above, indicating what type ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access