Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 400001 of DOMError

  • Revision slug: Web/API/DOMError
  • Revision title: DOMError
  • Revision id: 400001
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment webkit nigtly gets support.; 4 words added, 1 words removedDOM/DOMError Web/API/DOMError

Revision Content

{{ domref() }}

This interface describes an error object that contains an error name.

Properties

name
Readonly {{ domxref("DOMString") }}. Returns one of the error type names (see below).

Error types

Type Description
IndexSizeError The index is not in the allowed range (e.g. thrown in a {{ domxref("range") }} object).
HierarchyRequestError The node tree hierarchy is not correct.
WrongDocumentError The object is in the wrong {{ domxref("document") }}.
InvalidCharacterError The string contains invalid characters.
NoModificationAllowedError The object can not be modified.
NotFoundError The object can not be found here.
NotSupportedError The operation is not supported
InvalidStateError The object is in an invalid state.
SyntaxError The string did not match the expected pattern.
InvalidModificationError The object can not be modified in this way.
NamespaceError The operation is not allowed by Namespaces in XML
InvalidAccessError The object does not support the operation or argument.
TypeMismatchError The type of the object does not match the expected type.
SecurityError The operation is insecure.
NetworkError A network error occurred.
AbortError The operation was aborted.
URLMismatchError The given URL does not match another URL.
QuotaExceededError The quota has been exceeded.
TimeoutError The operation timed out.
InvalidNodeTypeError The node is incorrect or has an incorrect ancestor for this operation.
DataCloneError The object can not be cloned.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{ CompatUnknown() }} 12.0 {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatNightly() }}(537.1)
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{ CompatUnknown() }} 12.0 {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

Specification

  • {{ spec("https://www.w3.org/TR/dom/#interface-domerror", "DOM 4 DOMError specification", "WD") }}

See also

  • {{ domxref("DOMException") }}

Revision Source

<p>{{ domref() }}</p>
<p>This interface describes an error object that contains an error name.</p>
<h2 id="Properties">Properties</h2>
<dl> <dt>name</dt> <dd>Readonly {{ domxref("DOMString") }}. Returns one of the error type names (see below).</dd>
</dl>
<h2 id="Error_types">Error types</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).</td> </tr> <tr> <td><code>HierarchyRequestError</code></td> <td>The node tree hierarchy is not correct.</td> </tr> <tr> <td><code>WrongDocumentError</code></td> <td>The object is in the wrong {{ domxref("document") }}.</td> </tr> <tr> <td><code>InvalidCharacterError</code></td> <td>The string contains invalid characters.</td> </tr> <tr> <td><code>NoModificationAllowedError</code></td> <td>The object can not be modified.</td> </tr> <tr> <td><code>NotFoundError</code></td> <td>The object can not be found here.</td> </tr> <tr> <td><code>NotSupportedError</code></td> <td>The operation is not supported</td> </tr> <tr> <td><code>InvalidStateError</code></td> <td>The object is in an invalid state.</td> </tr> <tr> <td><code>SyntaxError</code></td> <td>The string did not match the expected pattern.</td> </tr> <tr> <td><code>InvalidModificationError</code></td> <td>The object can not be modified in this way.</td> </tr> <tr> <td><code>NamespaceError</code></td> <td>The operation is not allowed by Namespaces in XML</td> </tr> <tr> <td><code>InvalidAccessError</code></td> <td>The object does not support the operation or argument.</td> </tr> <tr> <td><code>TypeMismatchError</code></td> <td>The type of the object does not match the expected type.</td> </tr> <tr> <td><code>SecurityError</code></td> <td>The operation is insecure.</td> </tr> <tr> <td><code>NetworkError</code></td> <td>A network error occurred.</td> </tr> <tr> <td><code>AbortError</code></td> <td>The operation was aborted.</td> </tr> <tr> <td><code>URLMismatchError</code></td> <td>The given URL does not match another URL.</td> </tr> <tr> <td><code>QuotaExceededError</code></td> <td>The quota has been exceeded.</td> </tr> <tr> <td><code>TimeoutError</code></td> <td>The operation timed out.</td> </tr> <tr> <td><code>InvalidNodeTypeError</code></td> <td>The node is incorrect or has an incorrect ancestor for this operation.</td> </tr> <tr> <td><code>DataCloneError</code></td> <td>The object can not be cloned.</td> </tr> </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop"> <table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Chrome</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>12.0</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatNightly() }}(<a class=" external" href="https://trac.webkit.org/changeset/118226">537.1</a>)</td> </tr> </tbody> </table>
</div>
<div id="compat-mobile"> <table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Android</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>12.0</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> </tr> </tbody> </table>
</div>
<h2 id="Specification">Specification</h2>
<ul> <li>{{ spec("https://www.w3.org/TR/dom/#interface-domerror", "DOM 4 DOMError specification", "WD") }}</li>
</ul>
<h2 id="See_also">See also</h2>
<ul> <li>{{ domxref("DOMException") }}</li>
</ul>
Revert to this revision