HTML5 Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/6602

SVNBugCommentTime (UTC)
660213328[Gecko] [Internet Explorer] [Opera] [Webkit] Exceptions DOM Core/WebIDL fix.2011-09-30 00:21
Index: source
===================================================================
--- source	(revision 6601)
+++ source	(revision 6602)
@@ -2715,54 +2715,41 @@
 
     </ul>
 
-    <p>The following <code>DOMException</code> codes are defined in
-    the DOM Core specification: <a
-    href="#refsDOMCORE">[DOMCORE]</a></p>
+    <p>The term <dfn>throw</dfn> in this specification is used as
+    defined in the DOM Core specification. The following
+    <code>DOMException</code> types are defined in the DOM Core
+    specification: <a href="#refsDOMCORE">[DOMCORE]</a></p>
 
     <ol class="brief">
-     <li value="1"><dfn><code>INDEX_SIZE_ERR</code></dfn></li>
-     <li value="2"><dfn><code>DOMSTRING_SIZE_ERR</code></dfn></li>
-     <li value="3"><dfn><code>HIERARCHY_REQUEST_ERR</code></dfn></li>
-     <li value="4"><dfn><code>WRONG_DOCUMENT_ERR</code></dfn></li>
-     <li value="5"><dfn><code>INVALID_CHARACTER_ERR</code></dfn></li>
-     <li value="6"><dfn><code>NO_DATA_ALLOWED_ERR</code></dfn></li>
-     <li value="7"><dfn><code>NO_MODIFICATION_ALLOWED_ERR</code></dfn></li>
-     <li value="8"><dfn><code>NOT_FOUND_ERR</code></dfn></li>
-     <li value="9"><dfn><code>NOT_SUPPORTED_ERR</code></dfn></li>
-     <li value="10"><dfn><code>INUSE_ATTRIBUTE_ERR</code></dfn></li>
-     <li value="11"><dfn><code>INVALID_STATE_ERR</code></dfn></li>
-     <li value="12"><dfn><code>SYNTAX_ERR</code></dfn></li>
-     <li value="13"><dfn><code>INVALID_MODIFICATION_ERR</code></dfn></li>
-     <li value="14"><dfn><code>NAMESPACE_ERR</code></dfn></li>
-     <li value="15"><dfn><code>INVALID_ACCESS_ERR</code></dfn></li>
-     <li value="16"><dfn><code>VALIDATION_ERR</code></dfn></li>
-     <li value="17"><dfn><code>TYPE_MISMATCH_ERR</code></dfn></li>
-     <li value="18"><dfn><code>SECURITY_ERR</code></dfn></li>
-     <li value="19"><dfn><code>NETWORK_ERR</code></dfn></li>
-     <li value="20"><dfn><code>ABORT_ERR</code></dfn></li>
-     <li value="21"><dfn><code>URL_MISMATCH_ERR</code></dfn></li>
-     <li value="22"><dfn><code>QUOTA_EXCEEDED_ERR</code></dfn></li>
-     <li value="23"><dfn><code>TIMEOUT_ERR</code></dfn></li>
-     <li value="24"><dfn><code>INVALID_NODE_TYPE_ERR</code></dfn></li>
-     <li value="25"><dfn><code>DATA_CLONE_ERR</code></dfn></li>
-  <!--
-     <li value="81"><dfn><code>PARSE_ERR</code></dfn></li> <!- - actually defined in dom3ls - ->
-     <li value="82"><dfn><code>SERIALIZE_ERR</code></dfn></li> <!- - actually defined in dom3ls - ->
-  -->
+     <li value="1"><dfn><code>IndexSizeError</code></dfn></li>
+     <li value="3"><dfn><code>HierarchyRequestError</code></dfn></li>
+     <li value="4"><dfn><code>WrongDocumentError</code></dfn></li>
+     <li value="5"><dfn><code>InvalidCharacterError</code></dfn></li>
+     <li value="7"><dfn><code>NoModificationAllowedError</code></dfn></li>
+     <li value="8"><dfn><code>NotFoundError</code></dfn></li>
+     <li value="9"><dfn><code>NotSupportedError</code></dfn></li>
+     <li value="11"><dfn><code>InvalidStateError</code></dfn></li>
+     <li value="12"><dfn><code>SyntaxError</code></dfn></li>
+     <li value="13"><dfn><code>InvalidModificationError</code></dfn></li>
+     <li value="14"><dfn><code>NamespaceError</code></dfn></li>
+     <li value="15"><dfn><code>InvalidAccessError</code></dfn></li>
+     <li value="17"><dfn><code>TypeMismatchError</code></dfn></li>
+     <li value="18"><dfn><code>SecurityError</code></dfn></li>
+     <li value="19"><dfn><code>NetworkError</code></dfn></li>
+     <li value="20"><dfn><code>AbortError</code></dfn></li>
+     <li value="21"><dfn><code>URLMismatchError</code></dfn></li>
+     <li value="22"><dfn><code>QuotaExceededError</code></dfn></li>
+     <li value="23"><dfn><code>TimeoutError</code></dfn></li>
+     <li value="24"><dfn><code>InvalidNodeTypeError</code></dfn></li>
+     <li value="25"><dfn><code>DataCloneError</code></dfn></li>
     </ol>
 
-    <p>When this specification requires that a user agent <i>throw</i>
-    or <i>raise</i> an exception named using a code listed above, it
-    means that the user agent is required to create a
-    <code>DOMException</code> exception object configured to represent
-    the condition with the given code, then handle that object as a
-    thrown exception as defined in the JavaScript specification. <a
-    href="#refsECMA262">[ECMA262]</a></p>
-
     <p class="example">For example, to <i>throw a
-    <code>TIMEOUT_ERR</code> exception</i>, a user agent would
-    construct a <code>DOMException</code> object whose code was set to
-    23 and actually throw that object as an exception.</p>
+    <code>TimeoutError</code> exception</i>, a user agent would
+    construct a <code>DOMException</code> object whose type was the
+    string "<code title="">TimeoutError</code>" (and whose code was
+    the number 23, for legacy reasons) and actually throw that object
+    as an exception.</p>
 
     <p>The following features are defined in the DOM Events
     specification: <a href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
@@ -2846,13 +2833,13 @@
     <p id="float-nan">Except where otherwise specified, if an IDL
     attribute that is a floating point number type (<code
     title="">double</code>) is assigned an Infinity or Not-a-Number
-    (NaN) value, a <code>NOT_SUPPORTED_ERR</code> exception must be
+    (NaN) value, a <code>NotSupportedError</code> exception must be
     raised.</p>
 
     <p>Except where otherwise specified, if a method with an argument
     that is a floating point number type (<code title="">double</code>)
     is passed an Infinity or Not-a-Number (NaN) value, a
-    <code>NOT_SUPPORTED_ERR</code> exception must be raised.</p>
+    <code>NotSupportedError</code> exception must be raised.</p>
 
    </dd>
 
@@ -7922,7 +7909,7 @@
   value, or if the attribute is absent, the default value must be
   returned instead, or &#x2212;1 if there is no default value. On
   setting, if the value is negative, the user agent must throw an
-  <code>INDEX_SIZE_ERR</code> exception. Otherwise, the given value
+  <code>IndexSizeError</code> exception. Otherwise, the given value
   must be converted to the shortest possible string representing the
   number as a <span>valid non-negative integer</span> and then that
   string must be used as the new content attribute value.</p>
@@ -7955,7 +7942,7 @@
   fails or returns an out of range value, or if the attribute is
   absent, the default value must be returned instead, or 1 if there is
   no default value. On setting, if the value is zero, the user agent
-  must throw an <code>INDEX_SIZE_ERR</code> exception. Otherwise, the
+  must throw an <code>IndexSizeError</code> exception. Otherwise, the
   given value must be converted to the shortest possible string
   representing the number as a <span>valid non-negative integer</span>
   and then that string must be used as the new content attribute
@@ -8389,7 +8376,7 @@
     <p>If <var title="">before</var> is omitted, null, or a number out
     of range, then <var title="">element</var> will be added at the
     end of the list.</p>
-    <p>This method will throw a <code>HIERARCHY_REQUEST_ERR</code>
+    <p>This method will throw a <code>HierarchyRequestError</code>
     exception if <var title="">element</var> is an ancestor of the
     element into which it is to be inserted.</p>
    </dd>
@@ -8515,12 +8502,12 @@
    <li><p>If <var title="">element</var> is an ancestor of the
    <code>select</code> element on which the
    <code>HTMLOptionsCollection</code> is rooted, then throw a
-   <code>HIERARCHY_REQUEST_ERR</code> exception.</li>
+   <code>HierarchyRequestError</code> exception.</li>
 
    <li><p>If <var title="">before</var> is an element, but that
    element isn't a descendant of the <code>select</code> element on
    which the <code>HTMLOptionsCollection</code> is rooted, then throw
-   a <code>NOT_FOUND_ERR</code> exception.</p></li>
+   a <code>NotFoundError</code> exception.</p></li>
 
    <li><p>If <var title="">element</var> and <var
    title="">before</var> are the same element, then return and abort
@@ -8967,7 +8954,7 @@
 
      <dd><p>Let <var title="">output</var> be a newly constructed <code>FileList</code> object containing a list of newly constructed <code>File</code> objects corresponding to the same underlying data as those in <var title="">input</var>, maintaining their relative order.</p></dd>
 
-<!--(when we add this, make sure to throw DATA_CLONE_ERR if these objects are already closed)
+<!--(when we add this, make sure to throw DataCloneError if these objects are already closed)
      <dt>If <var title="">input</var> is an <code>ArrayBuffer</code> object</dt>
 
      <dd><p>...</p></dd>
@@ -8998,7 +8985,7 @@
      <dt>If <var title="">input</var> is another native object type (e.g. <code>Error</code>, <code>Function</code>)</dt>
      <dt>If <var title="">input</var> is a host object (e.g. a DOM node)</dt>
 
-     <dd><p>Throw a <code>DATA_CLONE_ERR</code> exception and abort
+     <dd><p>Throw a <code>DataCloneError</code> exception and abort
      the overall <span>structured clone</span> algorithm.</p></dd>
 
     </dl>
@@ -9329,8 +9316,8 @@
 
   <h4 id="security-document">Security</h4>
 
-  <p id="security">User agents <span class="impl">must</span> raise a
-  <code>SECURITY_ERR</code> exception whenever any properties of a
+  <p id="security">User agents <span class="impl">must</span> throw a
+  <code>SecurityError</code> exception whenever any properties of a
   <code>Document</code> object are accessed by scripts whose
   <span>effective script origin</span> is not the <span title="same
   origin">same</span> as the <code>Document</code>'s <span>effective
@@ -9408,7 +9395,7 @@
     <code>iframe</code> with the <code
     title="attr-iframe-sandbox">sandbox</code> attribute) or the
     resource was labeled as <code>text/html-sandboxed</code>, a
-    <code>SECURITY_ERR</code> exception will be thrown on getting and
+    <code>SecurityError</code> exception will be thrown on getting and
     setting.</p>
    </dd>
 
@@ -9443,8 +9430,8 @@
   <span>cookie-free <code>Document</code> object</span>, then the user
   agent must return the empty string. Otherwise, if the
   <code>Document</code>'s <span>origin</span> is not a
-  scheme/host/port tuple, the user agent must raise a
-  <code>SECURITY_ERR</code> exception. Otherwise, the user agent must
+  scheme/host/port tuple, the user agent must throw a
+  <code>SecurityError</code> exception. Otherwise, the user agent must
   first <span>obtain the storage mutex</span> and then return the
   cookie-string for <span>the document's address</span> for a
   "non-HTTP" API, <span>decoded as UTF-8, with error handling</span>.
@@ -9454,7 +9441,7 @@
   <code>Document</code> object</span>, then the user agent must do
   nothing. Otherwise, if the <code>Document</code>'s
   <span>origin</span> is not a scheme/host/port tuple, the user agent
-  must raise a <code>SECURITY_ERR</code> exception. Otherwise, the
+  must throw a <code>SecurityError</code> exception. Otherwise, the
   user agent must <span>obtain the storage mutex</span> and then act
   as it would when <span title="receives a
   set-cookie-string">receiving a set-cookie-string</span> for
@@ -9711,7 +9698,7 @@
    <dd>
     <p>Returns <span>the body element</span>.</p>
     <p>Can be set, to replace <span>the body element</span>.</p>
-    <p>If the new value is not a <code>body</code> or <code>frameset</code> element, this will throw a <code>HIERARCHY_REQUEST_ERR</code> exception.</p>
+    <p>If the new value is not a <code>body</code> or <code>frameset</code> element, this will throw a <code>HierarchyRequestError</code> exception.</p>
    </dd>
 
   </dl>
@@ -9744,8 +9731,8 @@
    -->
 
    <li>If the new value is not a <code>body</code> or
-   <code>frameset</code> element, then raise a
-   <code>HIERARCHY_REQUEST_ERR</code> exception and abort these
+   <code>frameset</code> element, then throw a
+   <code>HierarchyRequestError</code> exception and abort these
    steps.</li>
 
    <li>Otherwise, if the new value is the same as <span>the body
@@ -10133,13 +10120,13 @@
    <li><p><span title="resolve a url">Resolve</span> the method's
    first argument, relative to the <span>entry script</span>'s <span
    title="script's base URL">base URL</span>. If this is not
-   successful, throw a <code>SYNTAX_ERR</code> exception and abort
+   successful, throw a <code>SyntaxError</code> exception and abort
    these steps. Otherwise, let <var title="">url</var> be the
    resulting <span>absolute URL</span>.</p></li>
 
    <li><p>If the <span>origin</span> of <var title="">url</var> is not
    the same as the <span>origin</span> of <var
-   title="">document</var>, throw a <code>SECURITY_ERR</code>
+   title="">document</var>, throw a <code>SecurityError</code>
    exception and abort these steps.</p></li>
 <!--SYNCLOAD
    <li><p>If <code title="dom-XMLDocumentLoader-async">async</code> is
@@ -11426,7 +11413,7 @@
      <li>If <var title="">name</var> contains a U+002D HYPHEN-MINUS
      character (-) followed by a character in the range U+0061 to
      U+007A (U+0061 LATIN SMALL LETTER A to U+007A LATIN SMALL LETTER
-     Z), throw a <code>SYNTAX_ERR</code> exception and abort these
+     Z), throw a <code>SyntaxError</code> exception and abort these
      steps.</li>
 
      <li>For each character in the range U+0041 to U+005A (U+0041
@@ -11441,9 +11428,9 @@
      <li>Set the value of the attribute with the name <var
      title="">name</var>, to the value <var title="">value</var>,
      replacing any previous value if the attribute already existed. If
-     <code title="">setAttribute()</code> would have raised an
+     <code title="">setAttribute()</code> would have thrown an
      exception when setting an attribute with the name <var
-     title="">name</var>, then this must raise the same
+     title="">name</var>, then this must throw the same
      exception.</li>
 
     </ol>
@@ -11460,7 +11447,7 @@
      <li>If <var title="">name</var> contains a U+002D HYPHEN-MINUS
      character (-) followed by a character in the range U+0061 to
      U+007A (U+0061 LATIN SMALL LETTER A to U+007A LATIN SMALL LETTER
-     Z), throw a <code>SYNTAX_ERR</code> exception and abort these
+     Z), throw a <code>SyntaxError</code> exception and abort these
      steps.</li>
 -->
      <li>For each character in the range U+0041 to U+005A (U+0041
@@ -13315,7 +13302,7 @@
     <p>The method has no effect if the <code>Document</code> is still
     being parsed.</p>
 
-    <p>Throws an <code>INVALID_STATE_ERR</code> exception if the
+    <p>Throws an <code>InvalidStateError</code> exception if the
     <code>Document</code> is an <span title="XML documents">XML
     document</span>.</p>
 
@@ -13341,7 +13328,7 @@
 
    <li>If the <code>Document</code> object is not flagged as an <span
    title="HTML documents">HTML document</span>, throw an
-   <code>INVALID_STATE_ERR</code> exception and abort these
+   <code>InvalidStateError</code> exception and abort these
    steps.</li>
 
    <li><p>Let <var title="">type</var> be the value of the first
@@ -13528,8 +13515,8 @@
   arguments as the original call to the <code
   title="dom-document-open">open()</code> method, and return whatever
   that method returned. If the <code>HTMLDocument</code> object has no
-  <code>Window</code> object, then the method must raise an
-  <code>INVALID_ACCESS_ERR</code> exception.</p>
+  <code>Window</code> object, then the method must throw an
+  <code>InvalidAccessError</code> exception.</p>
 
   </div>
 
@@ -13546,7 +13533,7 @@
     <p>Closes the input stream that was opened by the <code
     title="dom-document-open">document.open()</code> method.</p>
 
-    <p>Throws an <code>INVALID_STATE_ERR</code> exception if the
+    <p>Throws an <code>InvalidStateError</code> exception if the
     <code>Document</code> is an <span title="XML documents">XML
     document</span>.</p>
 
@@ -13563,7 +13550,7 @@
 
    <li><p>If the <code>Document</code> object is not flagged as an
    <span title="HTML documents">HTML document</span>, throw an
-   <code>INVALID_STATE_ERR</code> exception and abort these
+   <code>InvalidStateError</code> exception and abort these
    steps.</p></li>
 
    <li><p>If there is no <span>script-created parser</span> associated
@@ -13610,7 +13597,7 @@
     these reasons, use of this method is strongly
     discouraged.</strong></p>
 
-    <p>This method throws an <code>INVALID_STATE_ERR</code> exception
+    <p>This method throws an <code>InvalidStateError</code> exception
     when invoked on <span>XML documents</span>.</p>
 
    </dd>
@@ -13637,7 +13624,7 @@
    <li>
 
     <p>If the method was invoked on an <span title="XML documents">XML
-    document</span>, throw an <code>INVALID_STATE_ERR</code>
+    document</span>, throw an <code>InvalidStateError</code>
     exception and abort these steps.</p>
 
     <!--
@@ -13727,7 +13714,7 @@
     <code title="dom-document-open">open()</code> method implicitly
     first.</p>
 
-    <p>This method throws an <code>INVALID_STATE_ERR</code> exception
+    <p>This method throws an <code>InvalidStateError</code> exception
     when invoked on <span>XML documents</span>.</p>
 
    </dd>
@@ -20733,8 +20720,8 @@
    browsing context given a browsing context name</span>, using the
    value of the <code title="attr-hyperlink-target">target</code>
    attribute as the browsing context name, would result in there not
-   being a chosen browsing context, then raise an
-   <code>INVALID_ACCESS_ERR</code> exception and abort these
+   being a chosen browsing context, then throw an
+   <code>InvalidAccessError</code> exception and abort these
    steps.</p></li>
 
    <li><p>If the target of the <code title="event-click">click</code>
@@ -30203,7 +30190,7 @@
 
     <p>Can be set, to seek to the given time.<p>
 
-    <p>Will throw an <code>INVALID_STATE_ERR</code> exception if there
+    <p>Will throw an <code>InvalidStateError</code> exception if there
     is no selected <span>media resource</span>
     or if there is a <span>current media controller</span>.</p>
 
@@ -30333,7 +30320,7 @@
   position</span>. The returned value must be expressed in seconds. On
   setting, if the <span>media element</span> has a <span>current media
   controller</span>, then the user agent must throw an
-  <code>INVALID_STATE_ERR</code> exception; otherwise, if the
+  <code>InvalidStateError</code> exception; otherwise, if the
   <span>media element</span>'s <code
   title="dom-media-readyState">readyState</code> is <code
   title="dom-media-HAVE_NOTHING">HAVE_NOTHING</code>, then it must set
@@ -30509,7 +30496,7 @@
    <dd>Enough of the resource has been obtained that the duration of
    the resource is available. In the case of a <code>video</code>
    element, the dimensions of the video are also available. The API
-   will no longer raise an exception when seeking. No <span>media
+   will no longer throw an exception when seeking. No <span>media
    data</span> is available for the immediate <span>current playback
    position</span>.
    The <span title="text track">text tracks</span>
@@ -32530,7 +32517,7 @@
 
     <p>Can be set, to change the volume multiplier.</p>
 
-    <p>Throws an <code>INDEX_SIZE_ERR</code> if the new value is not
+    <p>Throws an <code>IndexSizeError</code> if the new value is not
     in the range 0.0 .. 1.0.</p>
 
    </dd>
@@ -32736,7 +32723,7 @@
   <code title="event-MediaController-volumechange">volumechange</code>
   at the <code>MediaController</code>. If the new value is outside the
   range 0.0 to 1.0 inclusive, then, on setting, an
-  <code>INDEX_SIZE_ERR</code> exception must be raised instead.</p>
+  <code>IndexSizeError</code> exception must be raised instead.</p>
 
   <p>The <dfn
   title="dom-MediaController-muted"><code>muted</code></dfn>
@@ -34331,7 +34318,7 @@
   </dl>
 
   <p>On setting, if the new value is not either 0, 1, or 2, the user
-  agent must throw an <code>INVALID_ACCESS_ERR</code>
+  agent must throw an <code>InvalidAccessError</code>
   exception. Otherwise, if the new value isn't equal to what the
   attribute would currently return, the new value must be processed as
   follows:</p>
@@ -34431,13 +34418,13 @@
    <dt><var title="">mutableTextTrack</var> . <code title="dom-MutableTextTrack-addCue">addCue</code>( <var title="">cue</var> )</dt>
    <dd>
     <p>Adds the given cue to <var title="">mutableTextTrack</var>'s <span>text track list of cues</span>.</p>
-    <p>Raises an exception if the argument is associated with another <span>text track</span> or already in the list of cues.</p>
+    <p>Throws an exception if the argument is associated with another <span>text track</span> or already in the list of cues.</p>
    </dd>
 
    <dt><var title="">mutableTextTrack</var> . <code title="dom-MutableTextTrack-removeCue">removeCue</code>( <var title="">cue</var> )</dt>
    <dd>
     <p>Removes the given cue from <var title="">mutableTextTrack</var>'s <span>text track list of cues</span>.</p>
-    <p>Raises an exception if the argument is associated with another <span>text track</span> or not in the list of cues.</p>
+    <p>Throws an exception if the argument is associated with another <span>text track</span> or not in the list of cues.</p>
    </dd>
 
   </dl>
@@ -34455,7 +34442,7 @@
    <li>
 
     <p>If <var title="">kind</var> is not one of the following
-    strings, then throw a <code>SYNTAX_ERR</code> exception and abort
+    strings, then throw a <code>SyntaxError</code> exception and abort
     these steps:</p>
 
     <ul class="brief">
@@ -34533,7 +34520,7 @@
    <li><p>If the given <var title="">cue</var> is already associated
    with a <span>text track</span> other than the method's
    <code>MutableTextTrack</code> object's <span>text track</span>,
-   then throw an <code>INVALID_STATE_ERR</code> exception and abort
+   then throw an <code>InvalidStateError</code> exception and abort
    these steps.</p></li>
 
    <li><p>Associate <var title="">cue</var> with the method's
@@ -34544,7 +34531,7 @@
    <li><p>If the given <var title="">cue</var> is already listed in
    the method's <code>MutableTextTrack</code> object's <span>text
    track</span>'s <span>text track list of cues</span>, then throw an
-   <code>INVALID_STATE_ERR</code> exception.</p></li>
+   <code>InvalidStateError</code> exception.</p></li>
 
    <li><p>Add <var title="">cue</var> to the method's
    <code>MutableTextTrack</code> object's <span>text track</span>'s
@@ -34562,13 +34549,13 @@
 
    <li><p>If the given <var title="">cue</var> is not associated with
    the method's <code>MutableTextTrack</code> object's <span>text
-   track</span>, then throw an <code>INVALID_STATE_ERR</code>
+   track</span>, then throw an <code>InvalidStateError</code>
    exception.</p></li>
 
    <li><p>If the given <var title="">cue</var> is not currently listed
    in the method's <code>MutableTextTrack</code> object's <span>text
    track</span>'s <span>text track list of cues</span>, then throw a
-   <code>NOT_FOUND_ERR</code> exception.</p></li>
+   <code>NotFoundError</code> exception.</p></li>
 
    <li><p>Remove <var title="">cue</var> from the method's
    <code>MutableTextTrack</code> object's <span>text track</span>'s
@@ -37513,7 +37500,7 @@
 
     <p>Can be set, to change the volume.</p>
 
-    <p>Throws an <code>INDEX_SIZE_ERR</code> if the new value is not
+    <p>Throws an <code>IndexSizeError</code> if the new value is not
     in the range 0.0 .. 1.0.</p>
 
    </dd>
@@ -37544,7 +37531,7 @@
   the new value is in the range 0.0 to 1.0 inclusive, the playback
   volume of any audio portions of the <span>media element</span> must
   be set to the new value. If the new value is outside the range 0.0
-  to 1.0 inclusive, then, on setting, an <code>INDEX_SIZE_ERR</code>
+  to 1.0 inclusive, then, on setting, an <code>IndexSizeError</code>
   exception must be raised instead.</p>
 
   <p>The <dfn title="dom-media-muted"><code>muted</code></dfn>
@@ -37668,7 +37655,7 @@
 
     <p>Returns the time for the start of the range with the given index.</p>
 
-    <p>Throws an <code>INDEX_SIZE_ERR</code> if the index is out of range.</p>
+    <p>Throws an <code>IndexSizeError</code> if the index is out of range.</p>
 
    </dd>
 
@@ -37678,7 +37665,7 @@
 
     <p>Returns the time for the end of the range with the given index.</p>
 
-    <p>Throws an <code>INDEX_SIZE_ERR</code> if the index is out of range.</p>
+    <p>Throws an <code>IndexSizeError</code> if the index is out of range.</p>
 
    </dd>
 
@@ -37701,7 +37688,7 @@
   the object, in seconds measured from the start of the timeline that
   the object covers.</p>
 
-  <p>These methods must raise <code>INDEX_SIZE_ERR</code> exceptions
+  <p>These methods must throw <code>IndexSizeError</code> exceptions
   if called with an <var title="">index</var> argument greater than or
   equal to the number of ranges represented by the object.</p>
 
@@ -38574,7 +38561,7 @@
   specification. <a href="#refsWEBIDL">[WEBIDL]</a></p>
 
   <p>Other arguments must be ignored and must not cause the user agent
-  to raise an exception. A future version of this specification will
+  to throw an exception. A future version of this specification will
   probably define other parameters to be passed to these methods to
   allow authors to more carefully control compression settings, image
   metadata, etc.</p>
@@ -39386,8 +39373,8 @@
     given offset. 0.0 is the offset at one end of the gradient, 1.0 is
     the offset at the other end.</p>
 
-    <p>Throws an <code>INDEX_SIZE_ERR</code> exception if the offset
-    is out of range. Throws a <code>SYNTAX_ERR</code> exception if the
+    <p>Throws an <code>IndexSizeError</code> exception if the offset
+    is out of range. Throws a <code>SyntaxError</code> exception if the
     color cannot be parsed.</p>
 
    </dd>
@@ -39401,7 +39388,7 @@
     coordinates represented by the arguments.</p>
 
     <p>If any of the arguments are not finite numbers, throws a
-    <code>NOT_SUPPORTED_ERR</code> exception.</p>
+    <code>NotSupportedError</code> exception.</p>
 
    </dd>
 
@@ -39414,8 +39401,8 @@
     represented by the arguments.</p>
 
     <p>If any of the arguments are not finite numbers, throws a
-    <code>NOT_SUPPORTED_ERR</code> exception. If either of the radii
-    are negative, throws an <code>INDEX_SIZE_ERR</code> exception.</p>
+    <code>NotSupportedError</code> exception. If either of the radii
+    are negative, throws an <code>IndexSizeError</code> exception.</p>
 
    </dd>
 
@@ -39429,9 +39416,9 @@
   method on the <code>CanvasGradient</code> interface adds a new stop
   to a gradient. If the <var title="">offset</var> is less than 0,
   greater than 1, infinite, or NaN, then an
-  <code>INDEX_SIZE_ERR</code> exception must be raised. If the <var
+  <code>IndexSizeError</code> exception must be raised. If the <var
   title="">color</var> cannot be <span>parsed as a CSS &lt;color&gt;
-  value</span>, then a <code>SYNTAX_ERR</code> exception must be
+  value</span>, then a <code>SyntaxError</code> exception must be
   raised. Otherwise, the gradient must have a new stop placed, at
   offset <var title="">offset</var> relative to the whole gradient,
   and with the color obtained by parsing <var title="">color</var> as
@@ -39450,8 +39437,8 @@
   title="">y0</var>) and end point (<var title="">x1</var>, <var
   title="">y1</var>) of the gradient. If any of the arguments to <code
   title="dom-context-2d-createLinearGradient">createLinearGradient()</code>
-  are infinite or NaN, the method must raise a
-  <code>NOT_SUPPORTED_ERR</code> exception. Otherwise, the method must
+  are infinite or NaN, the method must throw a
+  <code>NotSupportedError</code> exception. Otherwise, the method must
   return a linear <code>CanvasGradient</code> initialized with the
   specified line.</p>
 
@@ -39480,9 +39467,9 @@
   with origin (<var title="">x1</var>, <var title="">y1</var>) and
   radius <var title="">r1</var>. The values are in coordinate space
   units. If any of the arguments are infinite or NaN, a
-  <code>NOT_SUPPORTED_ERR</code> exception must be raised. If either
+  <code>NotSupportedError</code> exception must be raised. If either
   of <var title="">r0</var> or <var title="">r1</var> are negative, an
-  <code>INDEX_SIZE_ERR</code> exception must be raised. Otherwise,
+  <code>IndexSizeError</code> exception must be raised. Otherwise,
   the method must return a radial <code>CanvasGradient</code>
   initialized with the two specified circles.</p>
 
@@ -39584,8 +39571,8 @@
     title="">repeat</code> is used.</p>
 
     <p>If the image has no image data, throws an
-    <code>INVALID_STATE_ERR</code> exception. If the second argument
-    isn't one of the allowed values, throws a <code>SYNTAX_ERR</code>
+    <code>InvalidStateError</code> exception. If the second argument
+    isn't one of the allowed values, throws a <code>SyntaxError</code>
     exception. If the image isn't yet fully decoded, then the method
     returns null.</p>
 
@@ -39608,7 +39595,7 @@
   <code title="">repeat-x</code>, <code title="">repeat-y</code>,
   <code title="">no-repeat</code>. If the empty string is specified,
   <code title="">repeat</code> must be assumed. If an unrecognized value
-  is given, then the user agent must raise a <code>SYNTAX_ERR</code>
+  is given, then the user agent must throw a <code>SyntaxError</code>
   exception. User agents must recognize the four values described above
   exactly (e.g. they must not do case folding). Except as specified
   below, the method must return a <code>CanvasPattern</code> object
@@ -39633,7 +39620,7 @@
   <p>If the <var title="">image</var> argument is an
   <code>HTMLCanvasElement</code> object with either a horizontal
   dimension or a vertical dimension equal to zero, then the
-  implementation must raise an <code>INVALID_STATE_ERR</code>
+  implementation must throw an <code>InvalidStateError</code>
   exception.</p>
   <!-- drawImage() has an equivalent paragraph -->
 
@@ -40235,7 +40222,7 @@
     current subpath, connected to the previous point by a straight
     line.</p>
 
-    <p>Throws an <code>INDEX_SIZE_ERR</code> exception if the given
+    <p>Throws an <code>IndexSizeError</code> exception if the given
     radius is negative.</p>
 
    </dd>
@@ -40250,7 +40237,7 @@
     in the given direction (defaulting to clockwise), is added to the
     path, connected to the previous point by a straight line.</p>
 
-    <p>Throws an <code>INDEX_SIZE_ERR</code> exception if the given
+    <p>Throws an <code>IndexSizeError</code> exception if the given
     radius is negative.</p>
 
    </dd>
@@ -40434,7 +40421,7 @@
   arguments and the last point in the subpath, as described below.</p>
 
   <p>Negative values for <var title="">radius</var> must cause the
-  implementation to raise an <code>INDEX_SIZE_ERR</code>
+  implementation to throw an <code>IndexSizeError</code>
   exception.</p>
 
   <p>Let the point (<var title="">x0</var>, <var title="">y0</var>) be
@@ -40514,7 +40501,7 @@
   zero length in both directions.</p>
 
   <p>Negative values for <var title="">radius</var> must cause the
-  implementation to raise an <code>INDEX_SIZE_ERR</code>
+  implementation to throw an <code>IndexSizeError</code>
   exception.</p>
 
   <hr>
@@ -41468,10 +41455,10 @@
 
     <p>If the first argument isn't an <code>img</code>,
     <code>canvas</code>, or <code>video</code> element, throws a
-    <code>TYPE_MISMATCH_ERR</code> exception. If the image has no
-    image data, throws an <code>INVALID_STATE_ERR</code> exception. If
+    <code>TypeMismatchError</code> exception. If the image has no
+    image data, throws an <code>InvalidStateError</code> exception. If
     the one of the source rectangle dimensions is zero, throws an
-    <code>INDEX_SIZE_ERR</code> exception. If the image isn't yet
+    <code>IndexSizeError</code> exception. If the image isn't yet
     fully decoded, then nothing is drawn.</p>
 
    </dd>
@@ -41518,7 +41505,7 @@
   <p>If the <var title="">image</var> argument is an
   <code>HTMLCanvasElement</code> object with either a horizontal
   dimension or a vertical dimension equal to zero, then the
-  implementation must raise an <code>INVALID_STATE_ERR</code>
+  implementation must throw an <code>InvalidStateError</code>
   exception.</p>
   <!-- createPattern() has an equivalent paragraph -->
 
@@ -41531,8 +41518,8 @@
   title="">sy</var>+<var title="">sh</var></span>).</p>
 
   <p>If one of the <var title="">sw</var> or <var title="">sh</var>
-  arguments is zero, the implementation must raise an
-  <code>INDEX_SIZE_ERR</code> exception.</p>
+  arguments is zero, the implementation must throw an
+  <code>IndexSizeError</code> exception.</p>
 
   <p>The destination rectangle is the rectangle whose corners are the
   four points (<var title="">dx</var>, <var title="">dy</var>),
@@ -41641,8 +41628,8 @@
     <p>Returns an <code>ImageData</code> object containing the image
     data for the given rectangle of the canvas.</p>
 
-    <p>Throws a <code>NOT_SUPPORTED_ERR</code> exception if any of the
-    arguments are not finite. Throws an <code>INDEX_SIZE_ERR</code>
+    <p>Throws a <code>NotSupportedError</code> exception if any of the
+    arguments are not finite. Throws an <code>IndexSizeError</code>
     exception if the either of the width or height arguments are
     zero.</p>
 
@@ -41682,8 +41669,8 @@
     etc.</p>
 
     <p>If the first argument is null, throws a
-    <code>TYPE_MISMATCH_ERR</code> exception. Throws a
-    <code>NOT_SUPPORTED_ERR</code> exception if any of the other
+    <code>TypeMismatchError</code> exception. Throws a
+    <code>NotSupportedError</code> exception if any of the other
     arguments are not finite.</p>
 
    </dd>
@@ -41726,10 +41713,10 @@
   <p>If any of the arguments to <code
   title="dom-context-2d-createImageData">createImageData()</code> or
   <code title="dom-context-2d-getImageData">getImageData()</code>
-  are infinite or NaN, the method must instead raise a
-  <code>NOT_SUPPORTED_ERR</code> exception. If either the <var
+  are infinite or NaN, the method must instead throw a
+  <code>NotSupportedError</code> exception. If either the <var
   title="">sw</var> or <var title="">sh</var> arguments are zero,
-  the method must instead raise an <code>INDEX_SIZE_ERR</code>
+  the method must instead throw an <code>IndexSizeError</code>
   exception.</p>
 
   <p><code>ImageData</code> objects must be initialized so that their
@@ -41766,7 +41753,7 @@
   <code>ImageData</code> structures back to the canvas.</p>
 
   <p>If any of the arguments to the method are infinite or NaN, the
-  method must raise a <code>NOT_SUPPORTED_ERR</code> exception.</p>
+  method must throw a <code>NotSupportedError</code> exception.</p>
 
   <p>When the last four arguments are omitted, they must be assumed to
   have the values 0, 0, the <code
@@ -42311,14 +42298,14 @@
   <p>Whenever the <code
   title="dom-canvas-toDataURL">toDataURL()</code> method of a
   <code>canvas</code> element whose <i>origin-clean</i> flag is set to
-  false is called, the method must raise a <code>SECURITY_ERR</code>
+  false is called, the method must throw a <code>SecurityError</code>
   exception.</p>
 
   <p>Whenever the <code
   title="dom-context-2d-getImageData">getImageData()</code> method of
   the 2D context of a <code>canvas</code> element whose
   <i>origin-clean</i> flag is set to false is called with otherwise
-  correct arguments, the method must raise a <code>SECURITY_ERR</code>
+  correct arguments, the method must throw a <code>SecurityError</code>
   exception.</p>
 
   <p>Whenever the <code
@@ -42326,8 +42313,8 @@
   the 2D context of a <code>canvas</code> element ends up using a font
   that has an <span>origin</span> that is not the <span title="same
   origin">same</span> as that of the <code>Document</code> object that
-  owns the <code>canvas</code> element, the method must raise a
-  <code>SECURITY_ERR</code> exception.</p>
+  owns the <code>canvas</code> element, the method must throw a
+  <code>SecurityError</code> exception.</p>
 
   <p class="note">Even resetting the canvas state by changing its
   <code title="attr-canvas-width">width</code> or <code
@@ -42682,8 +42669,8 @@
    browsing context given a browsing context name</span>, using the
    value of the <code title="attr-hyperlink-target">target</code>
    attribute as the browsing context name, would result in there not
-   being a chosen browsing context, then raise an
-   <code>INVALID_ACCESS_ERR</code> exception and abort these
+   being a chosen browsing context, then throw an
+   <code>InvalidAccessError</code> exception and abort these
    steps.</p></li>
 
    <li><p>Otherwise, the user agent must <span title="following
@@ -43493,7 +43480,7 @@
     <p>Returns the table's <code>caption</code> element.</p>
     <p>Can be set, to replace the <code>caption</code> element. If the
     new value is not a <code>caption</code> element, throws a
-    <code>HIERARCHY_REQUEST_ERR</code> exception.</p>
+    <code>HierarchyRequestError</code> exception.</p>
    </dd>
 
    <dt><var title="">caption</var> = <var title="">table</var> . <code title="dom-table-createCaption">createCaption</code>()</dt>
@@ -43511,7 +43498,7 @@
     <p>Returns the table's <code>thead</code> element.</p>
     <p>Can be set, to replace the <code>thead</code> element. If the
     new value is not a <code>thead</code> element, throws a
-    <code>HIERARCHY_REQUEST_ERR</code> exception.</p>
+    <code>HierarchyRequestError</code> exception.</p>
    </dd>
 
    <dt><var title="">thead</var> = <var title="">table</var> . <code title="dom-table-createTHead">createTHead</code>()</dt>
@@ -43529,7 +43516,7 @@
     <p>Returns the table's <code>tfoot</code> element.</p>
     <p>Can be set, to replace the <code>tfoot</code> element. If the
     new value is not a <code>tfoot</code> element, throws a
-    <code>HIERARCHY_REQUEST_ERR</code> exception.</p>
+    <code>HierarchyRequestError</code> exception.</p>
    </dd>
 
    <dt><var title="">tfoot</var> = <var title="">table</var> . <code title="dom-table-createTFoot">createTFoot</code>()</dt>
@@ -43561,14 +43548,14 @@
    <dd>
     <p>Creates a <code>tr</code> element, along with a <code>tbody</code> if required, inserts them into the table at the position given by the argument, and returns the <code>tr</code>.</p>
     <p>The position is relative to the rows in the table. The index &#x2212;1 is equivalent to inserting at the end of the table.</p>
-    <p>If the given position is less than &#x2212;1 or greater than the number of rows, throws an <code>INDEX_SIZE_ERR</code> exception.</p>
+    <p>If the given position is less than &#x2212;1 or greater than the number of rows, throws an <code>IndexSizeError</code> exception.</p>
    </dd>
 
    <dt><var title="">table</var> . <code title="dom-table-deleteRow">deleteRow</code>(<var title="">index</var>)</dt>
    <dd>
     <p>Removes the <code>tr</code> element with the given position in the table.</p>
     <p>The position is relative to the rows in the table. The index &#x2212;1 is equivalent to deleting the last row of the table.</p>
-    <p>If the given position is less than &#x2212;1 or greater than the index of the last row, or if there are no rows, throws an <code>INDEX_SIZE_ERR</code> exception.</p>
+    <p>If the given position is less than &#x2212;1 or greater than the index of the last row, or if there are no rows, throws an <code>IndexSizeError</code> exception.</p>
    </dd>
 
   </dl>
@@ -43583,7 +43570,7 @@
   <code>table</code> element, if any, must be removed, and the new
   value must be inserted as the first node of the <code>table</code>
   element. If the new value is not a <code>caption</code> element,
-  then a <code>HIERARCHY_REQUEST_ERR</code> DOM exception must be
+  then a <code>HierarchyRequestError</code> DOM exception must be
   raised instead.</p>
 
   <p>The <dfn
@@ -43609,7 +43596,7 @@
   element nor a <code>colgroup</code> element, if any, or at the end
   of the table if there are no such elements. If the new value is not
   a <code>thead</code> element, then a
-  <code>HIERARCHY_REQUEST_ERR</code> DOM exception must be raised
+  <code>HierarchyRequestError</code> DOM exception must be raised
   instead.</p>
 
   <p>The <dfn
@@ -43638,7 +43625,7 @@
   element, a <code>colgroup</code> element, nor a <code>thead</code>
   element, if any, or at the end of the table if there are no such
   elements. If the new value is not a <code>tfoot</code> element, then
-  a <code>HIERARCHY_REQUEST_ERR</code> DOM exception must be raised
+  a <code>HierarchyRequestError</code> DOM exception must be raised
   instead.</p>
 
   <p>The <dfn
@@ -43699,7 +43686,7 @@
    the number of elements in <code title="dom-table-rows">rows</code>
    collection:</dt>
 
-   <dd>The method must raise an <code>INDEX_SIZE_ERR</code>
+   <dd>The method must throw an <code>IndexSizeError</code>
    exception.</dd>
 
    <dt>If the <code title="dom-table-rows">rows</code> collection has
@@ -43752,7 +43739,7 @@
    <li><p>Now, if <var title="">index</var> is less than zero, or
    greater than or equal to the number of elements in the <code
    title="dom-table-rows">rows</code> collection, the method must
-   instead raise an <code>INDEX_SIZE_ERR</code> exception, and these
+   instead throw an <code>IndexSizeError</code> exception, and these
    steps must be aborted.</p></li>
 
    <li><p>Otherwise, the method must remove the <var
@@ -44299,14 +44286,14 @@
    <dd>
     <p>Creates a <code>tr</code> element, inserts it into the table section at the position given by the argument, and returns the <code>tr</code>.</p>
     <p>The position is relative to the rows in the table section. The index &#x2212;1, which is the default if the argument is omitted, is equivalent to inserting at the end of the table section.</p>
-    <p>If the given position is less than &#x2212;1 or greater than the number of rows, throws an <code>INDEX_SIZE_ERR</code> exception.</p>
+    <p>If the given position is less than &#x2212;1 or greater than the number of rows, throws an <code>IndexSizeError</code> exception.</p>
    </dd>
 
    <dt><var title="">tbody</var> . <code title="dom-tbody-deleteRow">deleteRow</code>(<var title="">index</var>)</dt>
    <dd>
     <p>Removes the <code>tr</code> element with the given position in the table section.</p>
     <p>The position is relative to the rows in the table section. The index &#x2212;1 is equivalent to deleting the last row of the table section.</p>
-    <p>If the given position is less than &#x2212;1 or greater than the index of the last row, or if there are no rows, throws an <code>INDEX_SIZE_ERR</code> exception.</p>
+    <p>If the given position is less than &#x2212;1 or greater than the index of the last row, or if there are no rows, throws an <code>IndexSizeError</code> exception.</p>
    </dd>
 
   </dl>
@@ -44324,7 +44311,7 @@
 
   <p>If <var title="">index</var> is less than &#x2212;1 or greater than the
   number of elements in the <code title="dom-tbody-rows">rows</code>
-  collection, the method must raise an <code>INDEX_SIZE_ERR</code>
+  collection, the method must throw an <code>IndexSizeError</code>
   exception.</p>
 
   <p>If <var title="">index</var> is missing, equal to &#x2212;1, or
@@ -44348,7 +44335,7 @@
   <var title="">index</var> is less than zero or greater than or equal
   to the number of elements in the <code
   title="dom-tbody-rows">rows</code> collection, the method must
-  instead raise an <code>INDEX_SIZE_ERR</code> exception.</p>
+  instead throw an <code>IndexSizeError</code> exception.</p>
 
   </div>
 
@@ -44553,7 +44540,7 @@
     is equivalent to inserting at the end of the row.</p>
 
     <p>If the given position is less than &#x2212;1 or greater than
-    the number of cells, throws an <code>INDEX_SIZE_ERR</code>
+    the number of cells, throws an <code>IndexSizeError</code>
     exception.</p>
 
    </dd>
@@ -44569,7 +44556,7 @@
 
     <p>If the given position is less than &#x2212;1 or greater than
     the index of the last cell, or if there are no cells, throws an
-    <code>INDEX_SIZE_ERR</code> exception.</p>
+    <code>IndexSizeError</code> exception.</p>
 
    </dd>
 
@@ -44610,7 +44597,7 @@
 
   <p>If <var title="">index</var> is less than &#x2212;1 or greater than the
   number of elements in the <code title="dom-tr-cells">cells</code>
-  collection, the method must raise an <code>INDEX_SIZE_ERR</code>
+  collection, the method must throw an <code>IndexSizeError</code>
   exception.</p>
 
   <p>If <var title="">index</var> is missing, equal to &#x2212;1, or
@@ -44633,7 +44620,7 @@
   <var title="">index</var> is less than zero or greater than or equal
   to the number of elements in the <code
   title="dom-tr-cells">cells</code> collection, the method must
-  instead raise an <code>INDEX_SIZE_ERR</code> exception.</p>
+  instead throw an <code>IndexSizeError</code> exception.</p>
 
   </div>
 
@@ -53766,7 +53753,7 @@
 
     <p>Can be set, to change the value.</p>
 
-    <p>Throws an <code>INVALID_STATE_ERR</code> exception if it is
+    <p>Throws an <code>InvalidStateError</code> exception if it is
     set to any value other than the empty string when the control is a
     file upload control.</p>
 
@@ -53807,7 +53794,7 @@
 
     <p>Can be set, to change the value.</p>
 
-    <p>Throws an <code>INVALID_STATE_ERR</code> exception if the
+    <p>Throws an <code>InvalidStateError</code> exception if the
     control isn't date- or time-based.</p>
 
    </dd>
@@ -53822,7 +53809,7 @@
 
     <p>Can be set, to change the value.</p>
 
-    <p>Throws an <code>INVALID_STATE_ERR</code> exception if the
+    <p>Throws an <code>InvalidStateError</code> exception if the
     control is neither date- or time-based nor numeric.</p>
 
    </dd>
@@ -53838,7 +53825,7 @@
     <var title="">n</var>. The default value for <var title="">n</var>
     is 1.</p>
 
-    <p>Throws <code>INVALID_STATE_ERR</code> exception if the control
+    <p>Throws <code>InvalidStateError</code> exception if the control
     is neither date- or time-based nor numeric, if the <code
     title="attr-input-step">step</code> attribute's value is "<code
     title="">any</code>", if the current <span
@@ -53936,7 +53923,7 @@
     any, or the empty string if the list is empty. On setting, if the
     new value is the empty string, it must empty the list of <span
     title="concept-input-type-file-selected">selected files</span>;
-    otherwise, it must throw an <code>INVALID_STATE_ERR</code>
+    otherwise, it must throw an <code>InvalidStateError</code>
     exception.</p>
 
     <p class="note">This "fakepath" requirement is a sad accident of
@@ -53995,7 +53982,7 @@
   title="dom-input-valueAsDate">valueAsDate</code> attribute does not
   apply, as defined for the <code>input</code> element's <code
   title="attr-input-type">type</code> attribute's current state, then
-  throw an <code>INVALID_STATE_ERR</code> exception; otherwise, if
+  throw an <code>InvalidStateError</code> exception; otherwise, if
   the new value is null, then set the <span
   title="concept-fe-value">value</span> of the element to the empty
   string; otherwise, run the <span
@@ -54035,7 +54022,7 @@
   title="dom-input-valueAsNumber">valueAsNumber</code> attribute does
   not apply, as defined for the <code>input</code> element's <code
   title="attr-input-type">type</code> attribute's current state, then
-  throw an <code>INVALID_STATE_ERR</code> exception. Otherwise, if
+  throw an <code>InvalidStateError</code> exception. Otherwise, if
   the <code
   title="dom-input-valueAsDate">valueAs<em>Date</em></code>
   attribute applies, run the <span
@@ -54063,19 +54050,19 @@
    <code title="dom-input-stepUp">stepUp()</code> methods do not
    apply, as defined for the <code>input</code> element's <code
    title="attr-input-type">type</code> attribute's current state, then
-   throw an <code>INVALID_STATE_ERR</code> exception, and abort these
+   throw an <code>InvalidStateError</code> exception, and abort these
    steps.</p></li>
 
    <li><p>If the element has no <span
    title="concept-input-step">allowed value step</span>, then throw an
-   <code>INVALID_STATE_ERR</code> exception, and abort these
+   <code>InvalidStateError</code> exception, and abort these
    steps.</p></li>
 
    <li><p>If applying the <span
    title="concept-input-value-string-number">algorithm to convert a
    string to a number</span> to the string given by the element's
    <span title="concept-fe-value">value</span> results in an error,
-   then throw an <code>INVALID_STATE_ERR</code> exception, and abort
+   then throw an <code>InvalidStateError</code> exception, and abort
    these steps; otherwise, let <var title="">value</var> be the result
    of that algorithm.</p></li>
 
@@ -54096,13 +54083,13 @@
    title="concept-input-min">minimum</span>, and the <var
    title="">value</var> is less than that <span
    title="concept-input-min">minimum</span>, then throw a
-   <code>INVALID_STATE_ERR</code> exception.</p></li>
+   <code>InvalidStateError</code> exception.</p></li>
 
    <li><p>If the element has a <span
    title="concept-input-max">maximum</span>, and the <var
    title="">value</var> is greater than that <span
    title="concept-input-max">maximum</span>, then throw a
-   <code>INVALID_STATE_ERR</code> exception.</p></li>
+   <code>InvalidStateError</code> exception.</p></li>
 
    <li><p>Let <var title="">value as string</var> be the result of
    running the <span
@@ -54779,7 +54766,7 @@
     <p>If <var title="">before</var> is omitted, null, or a number out
     of range, then <var title="">element</var> will be added at the
     end of the list.</p>
-    <p>This method will throw a <code>HIERARCHY_REQUEST_ERR</code>
+    <p>This method will throw a <code>HierarchyRequestError</code>
     exception if <var title="">element</var> is an ancestor of the
     element into which it is to be inserted.</p>
    </dd>
@@ -57818,8 +57805,8 @@
   <div class="impl">
 
   <p>When these methods and attributes are used with
-  <code>input</code> elements while they don't apply, they must raise
-  an <code>INVALID_STATE_ERR</code> exception. Otherwise, they must
+  <code>input</code> elements while they don't apply, they must throw
+  an <code>InvalidStateError</code> exception. Otherwise, they must
   act as described below.</p>
 
   <p>For <code>input</code> elements, these methods and attributes
@@ -65377,7 +65364,7 @@
     title="concept-property-value">value</span> when the element has
     no <code title="attr-itemprop">itemprop</code> attribute or when
     the element's value is an <span title="concept-item">item</span>
-    throws an <code>INVALID_ACCESS_ERR</code> exception.</p>
+    throws an <code>InvalidAccessError</code> exception.</p>
 
    </dd>
 
@@ -65441,13 +65428,13 @@
    <dt>If the element has no <code title="attr-itemprop">itemprop</code> attribute</dt>
 
    <dd><p>The attribute must return null on getting and must throw an
-   <code>INVALID_ACCESS_ERR</code> exception on setting.</p>
+   <code>InvalidAccessError</code> exception on setting.</p>
 
 
    <dt>If the element has an <code title="attr-itemscope">itemscope</code> attribute</dt>
 
    <dd><p>The attribute must return the element itself on getting and
-   must throw an <code>INVALID_ACCESS_ERR</code> exception on
+   must throw an <code>InvalidAccessError</code> exception on
    setting.</p>
 
 
@@ -69830,7 +69817,7 @@
 
     <p>Returns null if there isn't one.</p>
 
-    <p>Throws a <code>SECURITY_ERR</code> exception in cross-origin situations.</p>
+    <p>Throws a <code>SecurityError</code> exception in cross-origin situations.</p>
 
    </dd>
 
@@ -69873,7 +69860,7 @@
    <li><p>If the <span>browsing context container</span>'s
    <code>Document</code> does not have the <span title="same
    origin">same</span> <span>effective script origin</span> as the
-   <span>entry script</span>, then throw a <code>SECURITY_ERR</code>
+   <span>entry script</span>, then throw a <code>SecurityError</code>
    exception.</p></li>
 
    <li><p>Otherwise, return the <span>browsing context
@@ -70558,8 +70545,8 @@
 
   <h4 id="security-window">Security</h4>
 
-  <p id="security-2">User agents must raise a
-  <code>SECURITY_ERR</code> exception whenever any properties of a
+  <p id="security-2">User agents must throw a
+  <code>SecurityError</code> exception whenever any properties of a
   <code>Window</code> object are accessed by scripts whose
   <span>effective script origin</span> is not the same as the
   <code>Window</code> object's <code>Document</code>'s <span>effective
@@ -71800,7 +71787,7 @@
    <li>
 
     <p>If the <code>Document</code> has no <span>browsing
-    context</span>, throw a <code>SECURITY_ERR</code> exception and
+    context</span>, throw a <code>SecurityError</code> exception and
     abort these steps.</p>
 
    </li>
@@ -71815,7 +71802,7 @@
 
     <p>If ToASCII fails to convert one of the components of the
     string, e.g. because it is too long or because it contains invalid
-    characters, then throw a <code>SECURITY_ERR</code> exception and abort
+    characters, then throw a <code>SecurityError</code> exception and abort
     these steps. <a href="#refsRFC3490">[RFC3490]</a></p>
 
    </li>
@@ -71832,7 +71819,7 @@
      <li>
 
       <p>If the current value is an IP address, throw a
-      <code>SECURITY_ERR</code> exception and abort these steps.</p>
+      <code>SecurityError</code> exception and abort these steps.</p>
 
      </li>
 
@@ -71840,7 +71827,7 @@
 
       <p>If <var title="">new value</var>, prefixed by a U+002E FULL
       STOP (.), does not exactly match the end of the current value,
-      throw a <code>SECURITY_ERR</code> exception and abort these
+      throw a <code>SecurityError</code> exception and abort these
       steps.</p>
 
      </li>
@@ -71851,7 +71838,7 @@
       Public Suffix List, or, if <var title="">new value</var>,
       prefixed by a U+002E FULL STOP (.), matches the end of a
       suffix in the Public Suffix List, then throw a
-      <code>SECURITY_ERR</code> exception and abort these steps. <a
+      <code>SecurityError</code> exception and abort these steps. <a
       href="#refsPSL">[PSL]</a></p>
 
       <p>Suffixes must be compared after applying the IDNA ToASCII
@@ -72298,7 +72285,7 @@
      third argument, relative to the <span>entry script</span>'s <span
      title="script's base URL">base URL</span>.</li>
 
-     <li>If that fails, raise a <code>SECURITY_ERR</code> exception
+     <li>If that fails, throw a <code>SecurityError</code> exception
      and abort these steps.</li>
 
      <li>Compare the resulting <span>absolute URL</span> to <span>the
@@ -72307,7 +72294,7 @@
      title="url-path">&lt;path&gt;</span>, <span
      title="url-query">&lt;query&gt;</span>, and <span
      title="url-fragment">&lt;fragment&gt;</span> components, then
-     raise a <code>SECURITY_ERR</code> exception and abort these
+     throw a <code>SecurityError</code> exception and abort these
      steps.</li>
 
      <li>If the <span>origin</span> of the resulting <span>absolute
@@ -72317,7 +72304,7 @@
      title="url-path">&lt;path&gt;</span> or <span
      title="url-query">&lt;query&gt;</span> components of the two
      <span title="URL">URLs</span> compared in the previous step
-     differ, raise a <code>SECURITY_ERR</code> exception and abort
+     differ, throw a <code>SecurityError</code> exception and abort
      these steps. (This prevents sandboxed content from spoofing other
      pages on the same origin.)</li>
 
@@ -72700,7 +72687,7 @@
   <code title="dom-location-assign">assign()</code> and <code
   title="dom-location-replace">replace()</code> methods is not
   successful, then the user agent must instead throw a
-  <code>SYNTAX_ERR</code> exception.</p>
+  <code>SyntaxError</code> exception.</p>
 
   <p>When the <dfn
   title="dom-location-reload"><code>reload()</code></dfn> method is
@@ -72792,7 +72779,7 @@
   to the <span>entry script</span>'s <span title="script's base
   URL">base URL</span>, and if that succeeds, return the resulting
   <span>absolute URL</span>. If it fails, it must throw a
-  <code>SYNTAX_ERR</code> exception instead.</p>
+  <code>SyntaxError</code> exception instead.</p>
 
   </div>
 
@@ -72801,8 +72788,8 @@
 
   <h5 id="security-location">Security</h5>
 
-  <p id="security-3">User agents must raise a
-  <code>SECURITY_ERR</code> exception whenever any of the members of a
+  <p id="security-3">User agents must throw a
+  <code>SecurityError</code> exception whenever any of the members of a
   <code>Location</code> object are accessed by scripts whose
   <span>effective script origin</span> is not the <span title="same
   origin">same</span> as the <code>Location</code> object's associated
@@ -76830,7 +76817,7 @@
 
     <p>Invokes the <span>application cache download process</span>.</p>
 
-    <p>Throws an <code>INVALID_STATE_ERR</code> exception if there is no application cache to update.</p>
+    <p>Throws an <code>InvalidStateError</code> exception if there is no application cache to update.</p>
 
     <p>Calling this method is not usually necessary, as user agents
     will generally take care of updating <span title="application
@@ -76859,7 +76846,7 @@
 
     <p>Switches to the most recent application cache, if there is a
     newer one. If there isn't, throws an
-    <code>INVALID_STATE_ERR</code> exception.</p>
+    <code>InvalidStateError</code> exception.</p>
 
     <p>This does not cause previously-loaded resources to be reloaded;
     for example, images do not suddenly get reloaded and style sheets
@@ -76993,7 +76980,7 @@
   <span>cache host</span> to the algorithm. If there is no such
   <span>application cache</span>, or if it is marked as <span
   title="concept-appcache-obsolete">obsolete</span>, then the method
-  must raise an <code>INVALID_STATE_ERR</code> exception instead.</p>
+  must throw an <code>InvalidStateError</code> exception instead.</p>
 
   <p>If the <dfn title="dom-appcache-abort"><code>abort()</code></dfn>
   method is invoked, the user agent must <dfn>send a signal</dfn> to
@@ -77012,8 +76999,8 @@
 
    <li><p>Check that <code>ApplicationCache</code> object's
    <span>cache host</span> is associated with an <span>application
-   cache</span>. If it is not, then raise an
-   <code>INVALID_STATE_ERR</code> exception and abort these
+   cache</span>. If it is not, then throw an
+   <code>InvalidStateError</code> exception and abort these
    steps.</p></li>
 
    <li><p>Let <var title="">cache</var> be the <span>application
@@ -77033,8 +77020,8 @@
    whose <span title="concept-appcache-completeness">completeness
    flag</span> is <i>complete</i> and that is <span
    title="concept-appcache-newer">newer</span> than <var
-   title="">cache</var>. If there is not, then raise an
-   <code>INVALID_STATE_ERR</code> exception and abort these
+   title="">cache</var>. If there is not, then throw an
+   <code>InvalidStateError</code> exception and abort these
    steps.</p></li>
 
    <li><p>Let <var title="">new cache</var> be the <span
@@ -77522,7 +77509,7 @@
   <p>User agents may impose resource limitations on scripts, for
   example CPU quotas, memory limits, total execution time limits, or
   bandwidth limitations. When a script exceeds a limit, the user agent
-  may either throw a <code>QUOTA_EXCEEDED_ERR</code> exception, abort
+  may either throw a <code>QuotaExceededError</code> exception, abort
   the script without an exception, prompt the user, or throttle script
   execution.</p>
 
@@ -78733,7 +78720,7 @@
     representing a binary byte with values 0x00 to 0xFF respectively,
     and converts it to its base64 representation, which it returns.</p>
 
-    <p>Throws an <code>INVALID_CHARACTER_ERR</code> exception if the
+    <p>Throws an <code>InvalidCharacterError</code> exception if the
     input string contains any out-of-range characters.</p>
 
    </dd>
@@ -78748,7 +78735,7 @@
     each representing a binary byte with values 0x00 to 0xFF
     respectively, corresponding to that binary data.</p>
 
-    <p>Throws an <code>INVALID_CHARACTER_ERR</code> exception if the
+    <p>Throws an <code>InvalidCharacterError</code> exception if the
     input string is not valid base64 data.</p>
 
    </dd>
@@ -78762,7 +78749,7 @@
   interface (part of Web Workers).</p>
 
   <p>The <dfn title="dom-windowbase64-btoa"><code>btoa()</code></dfn>
-  method must throw an <code>INVALID_CHARACTER_ERR</code> exception if
+  method must throw an <code>InvalidCharacterError</code> exception if
   the method's first argument contains any character whose code point
   is greater than U+00FF. Otherwise, the user agent must convert that
   argument to a sequence of octets whose <var title="">n</var>th octet
@@ -78800,14 +78787,14 @@
 
    <li><p>If the length of <var title="">input</var> divides by 4
    leaving a remainder of 1, throw an
-   <code>INVALID_CHARACTER_ERR</code> exception and abort these
+   <code>InvalidCharacterError</code> exception and abort these
    steps.</p>
 
    <li>
 
     <p>If <var title="">input</var> contains a character that is not
     in the following list of characters and character ranges, throw an
-    <code>INVALID_CHARACTER_ERR</code> exception and abort these
+    <code>InvalidCharacterError</code> exception and abort these
     steps:</p>
 
     <ul class="brief">
@@ -79617,7 +79604,7 @@
     title="">url</var> relative to the <span>entry script</span>'s
     <span title="script's base URL">base URL</span>.</p>
 
-    <p>If this fails, then throw a <code>SYNTAX_ERR</code> exception
+    <p>If this fails, then throw a <code>SyntaxError</code> exception
     and abort these steps.</p>
 
    </li>
@@ -80039,11 +80026,11 @@
     placeholder for where to put the URL of the content to be
     handled.</p>
 
-    <p>Throws a <code>SECURITY_ERR</code> exception if the user agent
+    <p>Throws a <code>SecurityError</code> exception if the user agent
     blocks the registration (this might happen if trying to register
     as a handler for "http", for instance).</p>
 
-    <p>Throws a <code>SYNTAX_ERR</code> if the "<code
+    <p>Throws a <code>SyntaxError</code> if the "<code
     title="">%s</code>" string is missing in the URL.</p>
 
    </dd>
@@ -80094,8 +80081,8 @@
     <span>whitelisted scheme</span> nor a scheme whose value starts
     with the substring "<code title="">web+</code>" and otherwise
     contains only characters in the range U+0061 LATIN SMALL LETTER A
-    to U+007A LATIN SMALL LETTER Z, the user agent must raise
-    <code>SECURITY_ERR</code> exception.</p>
+    to U+007A LATIN SMALL LETTER Z, the user agent must throw a
+    <code>SecurityError</code> exception.</p>
 
     <p>The following schemes are the <dfn title="whitelisted
     scheme">whitelisted schemes</dfn>:</p>
@@ -80145,8 +80132,8 @@
     title="dom-navigator-registerContentHandler">registerContentHandler()</code>
     method is invoked with a <span>MIME type</span> that is in the
     <span>type blacklist</span> or that the user agent has deemed a
-    privileged type, the user agent must raise
-    <code>SECURITY_ERR</code> exception.</p>
+    privileged type, the user agent must throw a
+    <code>SecurityError</code> exception.</p>
 
     <p>The following <span title="MIME type">MIME types</span> are in
     the <dfn>type blacklist</dfn>:</p>
@@ -80182,12 +80169,12 @@
     <p>A string used to build the <span>URL</span> of the page that
     will handle the requests.</p>
 
-    <p>User agents must raise a <code>SYNTAX_ERR</code> exception if
+    <p>User agents must throw a <code>SyntaxError</code> exception if
     the <var title="">url</var> argument passed to one of these
     methods does not contain the exact literal string
     "<code>%s</code>".</p>
 
-    <p>User agents must raise a <code>SYNTAX_ERR</code> if <span
+    <p>User agents must throw a <code>SyntaxError</code> if <span
     title="resolve a url">resolving</span> the <var title="">url</var>
     argument relative to the <span>entry script</span>'s <span
     title="script's base URL">base URL</span>, is not successful.</p>
@@ -80197,7 +80184,7 @@
     string "<code title="">%s</code>" which is not a valid component
     in a URL.</p>
 
-    <p>User agents must raise a <code>SECURITY_ERR</code> exception if
+    <p>User agents must throw a <code>SecurityError</code> exception if
     the resulting <span>absolute URL</span> has an <span>origin</span>
     that differs from the <span>origin</span> of the <span>entry
     script</span>.</p>
@@ -80498,12 +80485,12 @@
    relative to the <span title="script's base URL">base URL</span> of
    the <span>entry script</span>.</p></li>
 
-   <li><p>If this fails, then throw a <code>SYNTAX_ERR</code>
+   <li><p>If this fails, then throw a <code>SyntaxError</code>
    exception, aborting the method.</p></li>
 
    <li><p>If the resoluting <span>absolute URL</span>'s
    <span>origin</span> is not the <span>same origin</span> as that of
-   the <span>entry script</span> throw a <span>SECURITY_ERR</span>
+   the <span>entry script</span> throw a <span>SecurityError</span>
    exception, aborting the method.</p></li>
 
    <li><p>Return the resulting <span>absolute URL</span> as the result
@@ -81739,7 +81726,7 @@
 
     <p>Can be set, to change that state.</p>
 
-    <p>Throws a <code>SYNTAX_ERR</code> exception if the new value
+    <p>Throws a <code>SyntaxError</code> exception if the new value
     isn't one of those strings.</p>
 
    </dd>
@@ -81771,7 +81758,7 @@
   value is an <span>ASCII case-insensitive</span> match for the string
   "<code title="">false</code>" then the content attribute must be set
   to the string "<code title="">false</code>", and otherwise the
-  attribute setter must raise a <code>SYNTAX_ERR</code> exception.</p>
+  attribute setter must throw a <code>SyntaxError</code> exception.</p>
 
   <p>The <dfn
   title="dom-isContentEditable"><code>isContentEditable</code></dfn>
@@ -83199,7 +83186,7 @@
 
    <li><p>If the <code>DataTransferItemList</code> object is not in the
    <i title="concept-dnd-rw">read/write mode</i>, throw an
-   <code>INVALID_STATE_ERR</code> exception and abort these
+   <code>InvalidStateError</code> exception and abort these
    steps.</p></li>
 
    <li><p>Remove the <var title="">i</var>th item from the <span>drag
@@ -83240,7 +83227,7 @@
       title="the drag data item type string">type string</span> is
       equal to the value of the method's second argument,
       <span>converted to ASCII lowercase</span>, then throw a
-      <code>NOT_SUPPORTED_ERR</code> exception and abort these
+      <code>NotSupportedError</code> exception and abort these
       steps.</p>
 
       <p>Otherwise, add an item to the <span>drag data store item
@@ -85393,7 +85380,7 @@
    exception throwing here) -->
 
    <li><p>If both <var title="">audio</var> and <var title="">video</var>
-   are still false, then throw a <code>NOT_SUPPORTED_ERR</code>
+   are still false, then throw a <code>NotSupportedError</code>
    exception and abort these steps.</p></li>
 
    <li><p>Return, and run the remaining steps asynchronously.</p></li>
@@ -86728,7 +86715,7 @@
     <p>The maximum length of <var title="">text</var> is 504 bytes
     after encoding the string as UTF-8; attempting to send a payload
     greater than 504 bytes results in an
-    <code>INVALID_ACCESS_ERR</code> exception.</p>
+    <code>InvalidAccessError</code> exception.</p>
 
    </dd>
 
@@ -87163,7 +87150,7 @@
    <li><p>If <var title="">connection</var>'s
    <span><code>PeerConnection</code> readiness state</span> is <code
    title="dom-PeerConnection-CLOSED">CLOSED</code> (3), throw an
-   <code>INVALID_STATE_ERR</code> exception.</p></li>
+   <code>InvalidStateError</code> exception.</p></li>
 
    <li>
 
@@ -87261,13 +87248,13 @@
    <li><p>If the <code>PeerConnection</code> object's
    <span><code>PeerConnection</code> readiness state</span> is <code
    title="dom-PeerConnection-CLOSED">CLOSED</code> (3), throw an
-   <code>INVALID_STATE_ERR</code> exception.</p></li>
+   <code>InvalidStateError</code> exception.</p></li>
 
    <li><p>Let <var title="">data</var> be <var title="">message</var>
    encoded as UTF-8. <a href="#refsRFC3629">[RFC3629]</a></p></li>
 
    <li><p>If <var title="">data</var> is longer than 504 bytes,
-   throw an <code>INVALID_ACCESS_ERR</code> exception and abort these
+   throw an <code>InvalidAccessError</code> exception and abort these
    steps.</p></li>
    <!-- IPv4: 576 (min IPv4 MTU size) - 20 (IP header) - 8 (UDP header) - 44 (UDP data media stream overhead) = 504 -->
    <!-- IPv6: 1280 (min IPv6 MTU size) - 40 (IP header) - 8 (UDP header) - 44 (UDP data media stream overhead) = 1188 -->
@@ -87301,7 +87288,7 @@
    <li><p>If the <code>PeerConnection</code> object's
    <span><code>PeerConnection</code> readiness state</span> is <code
    title="dom-PeerConnection-CLOSED">CLOSED</code> (3), throw an
-   <code>INVALID_STATE_ERR</code> exception.</p></li>
+   <code>InvalidStateError</code> exception.</p></li>
 
    <li><p>If <var title="">stream</var> is already in the
    <code>PeerConnection</code> object's <code
@@ -87340,7 +87327,7 @@
    <li><p>If the <code>PeerConnection</code> object's
    <span><code>PeerConnection</code> readiness state</span> is <code
    title="dom-PeerConnection-CLOSED">CLOSED</code> (3), throw an
-   <code>INVALID_STATE_ERR</code> exception.</p></li>
+   <code>InvalidStateError</code> exception.</p></li>
 
    <li><p>If <var title="">stream</var> is not in the
    <code>PeerConnection</code> object's <code
@@ -87384,7 +87371,7 @@
    <li><p>If the <code>PeerConnection</code> object's
    <span><code>PeerConnection</code> readiness state</span> is <code
    title="dom-PeerConnection-CLOSED">CLOSED</code> (3), throw an
-   <code>INVALID_STATE_ERR</code> exception.</p></li>
+   <code>InvalidStateError</code> exception.</p></li>
 
    <li><p>Destroy the <span><code>PeerConnection</code> ICE
    Agent</span>, abruptly ending any active ICE processing and any
@@ -89195,7 +89182,7 @@
    script</span>'s <span title="script's base URL">base URL</span>,
    when the method is invoked.</p></li>
 
-   <li><p>If this fails, throw a <code>SYNTAX_ERR</code>
+   <li><p>If this fails, throw a <code>SyntaxError</code>
    exception.</p></li>
 
    <li>
@@ -89203,7 +89190,7 @@
     <p>If the <span>origin</span> of the resulting <span>absolute
     URL</span> is not the <span title="same origin">same</span> as the
     origin of the <span>entry script</span>, then throw a
-    <code>SECURITY_ERR</code> exception.</p>
+    <code>SecurityError</code> exception.</p>
 
     <p class="note">Thus, scripts must be external files with the same
     scheme as the original page: you can't load a script from a <span
@@ -89328,7 +89315,7 @@
    <li><p><span title="resolve a url">Resolve</span> the <var
    title="">scriptURL</var> argument.</p></li>
 
-   <li><p>If this fails, throw a <code>SYNTAX_ERR</code>
+   <li><p>If this fails, throw a <code>SyntaxError</code>
    exception.</p></li>
 
    <li><p>Otherwise, let <var title="">scriptURL</var> be the
@@ -89342,7 +89329,7 @@
 
     <p>If the <span>origin</span> of <var title="">scriptURL</var> is
     not the <span title="same origin">same</span> as the origin of the
-    <span>entry script</span>, then throw a <code>SECURITY_ERR</code>
+    <span>entry script</span>, then throw a <code>SecurityError</code>
     exception.</p>
 
     <p class="note">Thus, scripts must be external files with the same
@@ -89423,7 +89410,7 @@
        title="dom-WorkerGlobalScope-location">location</code>
        attribute represents an <span>absolute URL</span> that is not
        exactly equal to <var title="">scriptURL</var>, then throw a
-       <code>URL_MISMATCH_ERR</code> exception and abort all these
+       <code>URLMismatchError</code> exception and abort all these
        steps.</p></li>
 
        <li><p>Associate <var title="">worker</var> with <var
@@ -89603,14 +89590,14 @@
    <li><p><span title="resolve a url">Resolve</span> each
    argument.</p></li>
 
-   <li><p>If any fail, throw a <code>SYNTAX_ERR</code>
+   <li><p>If any fail, throw a <code>SyntaxError</code>
    exception.</p></li>
 
 <!--
    <li><p>If any of the resulting <span title="absolute URL">absolute
    URLs</span> have an <span>origin</span> that is not the <span
    title="same origin">same</span> as the origin of the script that
-   invoked the method, then throw a <code>SECURITY_ERR</code>
+   invoked the method, then throw a <code>SecurityError</code>
    exception.</p></li>
 -->
 
@@ -89637,7 +89624,7 @@
       to complete.</p>
 
       <p>If the fetching attempt failed, throw a
-      <code>NETWORK_ERR</code> exception and abort all these
+      <code>NetworkError</code> exception and abort all these
       steps.</p>
 
       <p>If the attempt succeeds, then let <var title="">source</var> be
@@ -90044,7 +90031,7 @@
    URL">base URL</span>.</p></li>
 
    <li><p>If the previous step failed, then throw a
-   <code>SYNTAX_ERR</code> exception.</p></li>
+   <code>SyntaxError</code> exception.</p></li>
 
    <li><p>Return a new <code>EventSource</code> object, and continue
    these steps in the background (without blocking scripts).</p></li>
@@ -90968,19 +90955,19 @@
    title="">url</var> argument, to obtain <var title="">host</var>,
    <var title="">port</var>, <var title="">resource name</var>, and
    <var title="">secure</var>. If this fails, throw a
-   <code>SYNTAX_ERR</code> exception and abort these steps. <a
+   <code>SyntaxError</code> exception and abort these steps. <a
    href="#refsWSP">[WSP]</a></p></li>
 
    <li><p>If <var title="">secure</var> is false but the
    <span>origin</span> of the <span>entry script</span> has a scheme
    component that is itself a secure protocol, e.g. HTTPS, then throw
-   a <code>SECURITY_ERR</code> exception.</p></li>
+   a <code>SecurityError</code> exception.</p></li>
 
    <li>
 
     <p>If <var title="">port</var> is a port to which the user agent
     is configured to block access, then throw a
-    <code>SECURITY_ERR</code> exception. (User agents typically block
+    <code>SecurityError</code> exception. (User agents typically block
     access to well-known ports like SMTP.)</p>
 
     <!-- e.g. http://www.mozilla.org/projects/netlib/PortBanning.html -->
@@ -91009,7 +90996,7 @@
    elements that comprise the value of <code
    title="http-sec-websocket-protocol">Sec-WebSocket-Protocol</code>
    header fields as defined by the WebSocket protocol specification,
-   then throw a <code>SYNTAX_ERR</code> exception and abort these
+   then throw a <code>SyntaxError</code> exception and abort these
    steps. <a href="#refsWSP">[WSP]</a></p></li>
 
    <li><p>Let <var title="">origin</var> be the <span title="ASCII
@@ -91132,17 +91119,17 @@
 
    <li><p>If the method's first argument is present but is not an
    integer equal to 1000 or in the range 3000 to 4999, throw an
-   <code>INVALID_ACCESS_ERR</code> exception and abort these
+   <code>InvalidAccessError</code> exception and abort these
    steps.</p></li>
 
    <li><p>If the method's second argument has any unpaired surrogates,
-   then throw a <code>SYNTAX_ERR</code> exception and abort these
+   then throw a <code>SyntaxError</code> exception and abort these
    steps.</p></li>
 
    <li><p>If the method's second argument is present, then let <var
    title="">reason</var> be the result of encoding that argument as
    UTF-8. If <var title="">reason</var> is longer than 123 bytes, then
-   throw a <code>SYNTAX_ERR</code> exception and abort these steps.
+   throw a <code>SyntaxError</code> exception and abort these steps.
    <a href="#refsRFC3629">[RFC3629]</a></p></li>
 
    <li><p>Run the first matching steps from the following list:</p>
@@ -91297,7 +91284,7 @@
   the new value is either the string "<code title="">blob</code>" or
   the string "<code title="">arraybuffer</code>", then set the IDL
   attribute to this new value. Otherwise, throw a
-  <code>SYNTAX_ERR</code> exception.</p>
+  <code>SyntaxError</code> exception.</p>
 
   <p class="note">This attribute allows authors to control how binary
   data is exposed to scripts. By setting the attribute to "<code
@@ -91321,7 +91308,7 @@
   connection. If the <code
   title="dom-WebSocket-readyState">readyState</code> attribute is
   <code title="dom-WebSocket-CONNECTING">CONNECTING</code>, it must
-  raise an <code>INVALID_STATE_ERR</code> exception. Otherwise, the
+  throw an <code>InvalidStateError</code> exception. Otherwise, the
   user agent must run the appropriate set of steps from the following
   list:</p>
 
@@ -91332,7 +91319,7 @@
    <dd>
 
     <p>If the <var title="">data</var> argument has any unpaired
-    surrogates, then raise a <code>SYNTAX_ERR</code> exception. If
+    surrogates, then throw a <code>SyntaxError</code> exception. If
     <i>the WebSocket connection is established</i>, and the string has
     no unpaired surrogates, and <i title="the WebSocket closing
     handshake is started">the WebSocket closing handshake has not yet
@@ -91343,7 +91330,7 @@
     <i>close the WebSocket connection</i> <span
     title="concept-websocket-close-fail">with prejudice</span>. Any
     invokation of this method with a string argument that does not
-    raise an exception must increase the <code
+    throw an exception must increase the <code
     title="dom-WebSocket-bufferedAmount">bufferedAmount</code>
     attribute by the number of bytes needed to express the argument as
     UTF-8. <a href="#refsRFC3629">[RFC3629]</a> <a
@@ -91368,7 +91355,7 @@
     by the <code>Blob</code> object. <!-- that sentence is meant to
     invoke "This interface represents immutable raw data." --> Any
     invokation of this method with a <code>Blob</code> argument that
-    does not raise an exception must increase the <code
+    does not throw an exception must increase the <code
     title="dom-WebSocket-bufferedAmount">bufferedAmount</code>
     attribute by the size of the <code>Blob</code> object's raw data,
     in bytes. <!-- that sentence is meant to invoke the same as
@@ -91395,7 +91382,7 @@
     sentence is meant to invoke "The ArrayBuffer type describes a
     buffer used to store data for the array buffer views." at the top
     of the Typed Array spec --> Any invokation of this method with an
-    <code>ArrayBuffer</code> argument that does not raise an exception
+    <code>ArrayBuffer</code> argument that does not throw an exception
     must increase the <code
     title="dom-WebSocket-bufferedAmount">bufferedAmount</code>
     attribute by the length of the <code>ArrayBuffer</code> in bytes.
@@ -91863,7 +91850,7 @@
     state the origin, set the target origin to "<code
     title="">/</code>".</p>
 
-    <p>Throws a <code>DATA_CLONE_ERR</code> if <var
+    <p>Throws a <code>DataCloneError</code> if <var
     title="">transfer</var> array contains duplicate objects or if
     <var title="">message</var> could not be cloned.</p>
 
@@ -91899,7 +91886,7 @@
     <p>If the value of the <var title="">targetOrigin</var> argument
     is neither a single U+002A ASTERISK character (*), a single U+002F
     SOLIDUS character (/), nor an <span>absolute URL</span>, then
-    throw a <code>SYNTAX_ERR</code> exception and abort the overall
+    throw a <code>SyntaxError</code> exception and abort the overall
     set of steps.</p>
 
    </li>
@@ -91930,7 +91917,7 @@
       than once, or any of the <code>Transferable</code> objects
       listed in <var title="">transfer</var> have already been <span
       title="transfer a Transferable object">transfered</span> once
-      before, then throw a <code>DATA_CLONE_ERR</code> exception and
+      before, then throw a <code>DataCloneError</code> exception and
       abort these steps.</p>
 
      </li>
@@ -92199,7 +92186,7 @@
     title="">transfer</var> are transferred, not just cloned, meaning
     that they are no longer usable on the sending side.</p>
 
-    <p>Throws a <code>DATA_CLONE_ERR</code> if <var
+    <p>Throws a <code>DataCloneError</code> if <var
     title="">transfer</var> array contains duplicate objects or the
     source or target ports, or if <var title="">message</var> could
     not be cloned.</p>
@@ -92369,7 +92356,7 @@
       than once, or any of the <code>Transferable</code> objects
       listed in <var title="">transfer</var> have already been <span
       title="transfer a Transferable object">transfered</span> once
-      before, then throw a <code>DATA_CLONE_ERR</code> exception and
+      before, then throw a <code>DataCloneError</code> exception and
       abort these steps.</p>
 
      </li>
@@ -92379,7 +92366,7 @@
       <p>If any of the objects in <var title="">transfer</var> are
       either the <var title="">source port</var> or the <var
       title="">target port</var> (if any), then throw a
-      <code>DATA_CLONE_ERR</code> exception and abort these
+      <code>DataCloneError</code> exception and abort these
       steps.</p>
 
      </li>
@@ -92424,7 +92411,7 @@
 
    <li><p>If there is no <var title="">target port</var> (i.e. if <var
    title="">source port</var> is not entangled), then abort these
-   steps.</p></li> <!-- we don't raise an exception if there is no
+   steps.</p></li> <!-- we don't throw an exception if there is no
    target port because this can happen at a moment's notice. we don't
    return false because if the port is _about_ to be closed, the
    message might not be listened for anyway. we don't do this before
@@ -92474,7 +92461,7 @@
    <li><p>If the <var title="">source port</var> is not entangled with
    another port, then return <var title="">port1</var> and abort these
    steps.</p></li>
-   <!- - we don't raise an exception because this can happen moment's
+   <!- - we don't throw an exception because this can happen moment's
    notice. we don't return null because then we'd end up with
    null derefs. better to just let the likely next postMessage call
    fall on the floor. - ->
@@ -92800,8 +92787,8 @@
   <p>If the given <var title="">key</var> <em>does</em> exist in the
   list, then it must have its value updated to <var title="">value</var>.</p>
 
-  <p>If it couldn't set the new value, the method must raise an
-  <code>QUOTA_EXCEEDED_ERR</code> exception. (Setting could fail if,
+  <p>If it couldn't set the new value, the method must throw an
+  <code>QuotaExceededError</code> exception. (Setting could fail if,
   e.g., the user has disabled storage for the site, or if the quota
   has been exceeded.)</p>
 
@@ -92950,13 +92937,13 @@
 
   <ol>
 
-   <li><p>The user agent may throw a <code>SECURITY_ERR</code>
+   <li><p>The user agent may throw a <code>SecurityError</code>
    exception instead of returning a <code>Storage</code> object if the
    request violates a policy decision (e.g. if the user agent is
    configured to not allow the page to persist data).</p></li>
 
    <li><p>If the <code>Document</code>'s <span>origin</span> is not a
-   scheme/host/port tuple, then throw a <code>SECURITY_ERR</code>
+   scheme/host/port tuple, then throw a <code>SecurityError</code>
    exception and abort these steps.</p></li>
 
    <li><p>Check to see if the user agent has allocated a local storage
@@ -92998,7 +92985,7 @@
 
   <h6 id="security-localStorage">Security</h6>
 
-  <p>User agents must raise a <code>SECURITY_ERR</code> exception
+  <p>User agents must throw a <code>SecurityError</code> exception
   whenever any of the members of a <code>Storage</code> object
   originally returned by the <code
   title="dom-localStorage">localStorage</code> attribute are accessed
@@ -93151,7 +93138,7 @@
 
   <!--<p>If the storage area space limit is reached during a <code
   title="dom-Storage-setItem">setItem()</code> call, the method will
-  raise an exception.</p>-->
+  throw an exception.</p>-->
 
   <p>A mostly arbitrary limit of five megabytes per
   <span>origin</span> is recommended. Implementation feedback is
@@ -103191,7 +103178,7 @@
   algorithm</dfn>. The algorithm takes as input a DOM
   <code>Element</code>, <code>Document</code>, or
   <code>DocumentFragment</code> referred to as <var title="">the
-  node</var>, and either returns a string or raises an exception.</p>
+  node</var>, and either returns a string or throws an exception.</p>
 
   <p class="note">This algorithm serializes the <em>children</em> of
   the node being serialized, not the node itself.</p>
@@ -103417,8 +103404,8 @@
 
       <p>Other node types (e.g. <code title="">Attr</code>) cannot
       occur as children of elements. If, despite this, they somehow do
-      occur, this algorithm must raise an
-      <code>INVALID_STATE_ERR</code> exception.</p>
+      occur, this algorithm must throw an
+      <code>InvalidStateError</code> exception.</p>
 
      </li>
 
@@ -103902,7 +103889,7 @@
 
   <p>The <dfn>XML fragment serialization algorithm</dfn> for a
   <code>Document</code> or <code>Element</code> node either returns a
-  fragment of XML that represents that node or raises an
+  fragment of XML that represents that node or throws an
   exception.</p>
 
   <p>For <code>Document</code>s, the algorithm must return a string in
@@ -103942,8 +103929,8 @@
   namespace-well-formed.</p>
 
   <p>If any of the following error cases are found in the DOM subtree
-  being serialized, then the algorithm must raise an
-  <code>INVALID_STATE_ERR</code> exception instead of returning a
+  being serialized, then the algorithm must throw an
+  <code>InvalidStateError</code> exception instead of returning a
   string:</p>
 
   <ul>
@@ -104005,14 +103992,14 @@
   <p class="note">These are the only ways to make a DOM
   unserializable. The DOM enforces all the other XML constraints; for
   example, trying to append two elements to a <code>Document</code>
-  node will raise a <code>HIERARCHY_REQUEST_ERR</code> exception.</p>
+  node will throw a <code>HierarchyRequestError</code> exception.</p>
 
 
 
   <h3>Parsing XHTML fragments</h3>
 
   <p>The <dfn>XML fragment parsing algorithm</dfn> either returns a
-  <code>Document</code> or raises a <code>SYNTAX_ERR</code> exception.
+  <code>Document</code> or throws a <code>SyntaxError</code> exception.
   Given a string <var title="">input</var> and an optional context
   element <var title="concept-frag-parse-context">context</var>, the
   algorithm is as follows:</p>
@@ -104070,7 +104057,7 @@
    <li>
 
     <p>If there is an XML well-formedness or XML namespace
-    well-formedness error, then raise a <code>SYNTAX_ERR</code>
+    well-formedness error, then throw a <code>SyntaxError</code>
     exception and abort these steps.</p>
 
    </li>
@@ -116265,7 +116252,6 @@
  v2  * become more consistent about what markup we use to mark up
        productions (nothing? <i>? <code>?)
  v2  * use <code>Document</code> consistently instead of 'document'.
- v2  * s/raise/throw/g
  v2  * be clearer about arrays/lists/collections being zero-based
        despite using the term "/index/th".
  v2  * use the sample widgets:

|