DOMException
This event can be used to catch errors relating to DOM Operations.
See DOM Level 3 Core - DOMException for more information about the DOMException.
Example
try
{
var title = doc.createElement("title");
doc.getDocumentElement().appendChild(title);
}
catch (/* DOMException */ e)
{
switch (e.code)
{
case 16:
// VALIDATION_ERR
alert("Inserting a title is not allowed");
break;
default:
alert(e);
break;
}
}- Documentation
- › API
- › DOM API
- › DOMException
History
| version | event |
|---|---|
| Xopus 3.2.6 | Change. Added message property. |
| Xopus 3 | Introduction. |