Merge WHATWG change: Use much less terminate these steps in algorithm descriptions.
--- a/Overview.html Fri May 10 00:10:12 2013 +0900
+++ b/Overview.html Fri May 10 01:01:05 2013 +0900
@@ -926,30 +926,24 @@
<li><p>If the state is not
<a href="#dom-xmlhttprequest-opened" title="dom-XMLHttpRequest-OPENED">OPENED</a>,
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception and
- terminate these steps.
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception.
<li><p>If the <a href="#send-flag"><code>send()</code> flag</a> is set,
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception and
- terminate these steps.
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception.
<li><p>If <var>header</var> does not match the
<a class="external" href="http://tools.ietf.org/html/rfc2616/#section-4.2">field-name</a> production,
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> a
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#syntaxerror">SyntaxError</a></code>" exception and terminate
- these steps.
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#syntaxerror">SyntaxError</a></code>" exception.
<li>
<p>If <var>value</var> does not match the
<a class="external" href="http://tools.ietf.org/html/rfc2616/#section-4.2">field-value</a> production,
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> a
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#syntaxerror">SyntaxError</a></code>" exception and terminate
- these steps.
-
- <p class="note">The empty string is legal and represents the empty
- header value.</p>
- </li>
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#syntaxerror">SyntaxError</a></code>" exception.
+
+ <p class="note">An empty string represents an empty header field value.
<li>
<p>Terminate these steps if <var>header</var> is a case-insensitive
@@ -1008,11 +1002,6 @@
use of HTTP here in line with contemporary implementations.
</ol>
- <p class="note">See also the
- <code title="dom-XMLHttpRequest-send"><a href="#dom-xmlhttprequest-send">send()</a></code> method regarding user
- agent header handling for caching, authentication, proxies, and
- cookies.</p>
-
<div class="example">
<p>Some simple code demonstrating what happens when setting the same
header twice:</p>
@@ -1064,8 +1053,7 @@
<a class="external" href="http://dev.w3.org/html5/spec/webappapis.html#document-environment">document environment</a> and the
<a href="#synchronous-flag">synchronous flag</a> is set,
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidaccesserror">InvalidAccessError</a></code>" exception and
- terminate these steps.
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidaccesserror">InvalidAccessError</a></code>" exception.
<li><p>Set its value to the new value.
</ol>
@@ -1114,26 +1102,22 @@
<a href="#dom-xmlhttprequest-unsent" title="dom-XMLHttpRequest-UNSENT">UNSENT</a> or
<a href="#dom-xmlhttprequest-opened" title="dom-XMLHttpRequest-OPENED">OPENED</a>,
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception and
- terminate these steps.
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception.
<li><p>If the <a href="#send-flag"><code>send()</code> flag</a> is set,
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception and
- terminate these steps.
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception.
<li><p>If the <a href="#anonymous-flag">anonymous flag</a> is set,
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidaccesserror">InvalidAccessError</a></code>" exception and
- terminate these steps.
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidaccesserror">InvalidAccessError</a></code>" exception.
<li><p>If the
<a class="external" href="http://dev.w3.org/html5/spec/infrastructure.html#javascript-global-environment">JavaScript global environment</a> is a
<a class="external" href="http://dev.w3.org/html5/spec/webappapis.html#document-environment">document environment</a> and the
<a href="#synchronous-flag">synchronous flag</a> is set,
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidaccesserror">InvalidAccessError</a></code>" exception and
- terminate these steps.
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidaccesserror">InvalidAccessError</a></code>" exception.
<li><p>Set the
<code title="dom-XMLHttpRequest-withCredentials"><a href="#dom-xmlhttprequest-withcredentials">withCredentials</a></code>
@@ -1190,13 +1174,11 @@
<li><p>If the state is not
<a href="#dom-xmlhttprequest-opened" title="dom-XMLHttpRequest-OPENED">OPENED</a>,
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception and
- terminate these steps.
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception.
<li><p>If the <a href="#send-flag"><code>send()</code> flag</a> is set,
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception and
- terminate these steps.
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception.
<li><p>If the <a href="#request-method">request method</a> is <code>GET</code> or
<code>HEAD</code>, set <var title="">data</var> to null.
@@ -1746,8 +1728,7 @@
<li><p>If the <a href="#synchronous-flag">synchronous flag</a> is set,
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
- <var>exception</var> exception and terminate the overall set of
- steps.</li>
+ <var>exception</var> exception.</li>
<li>
<p><a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-event-fire" title="concept-event-fire">Fire an event</a> named <code title="event-xhr-readystatechange"><a href="#event-xhr-readystatechange">readystatechange</a></code>.</p>
@@ -1962,11 +1943,9 @@
<ol>
<li><p>If the state is
<a href="#dom-xmlhttprequest-unsent" title="dom-XMLHttpRequest-UNSENT">UNSENT</a> or
- <a href="#dom-xmlhttprequest-opened" title="dom-XMLHttpRequest-OPENED">OPENED</a>, return 0 and
- terminate these steps.
-
- <li><p>If the <a href="#error-flag">error flag</a> is set, return 0 and terminate
- these steps.</li>
+ <a href="#dom-xmlhttprequest-opened" title="dom-XMLHttpRequest-OPENED">OPENED</a>, return 0.
+
+ <li><p>If the <a href="#error-flag">error flag</a> is set, return 0.</li>
<li><p>Return the HTTP status code.</li>
</ol>
@@ -1986,11 +1965,9 @@
<ol>
<li><p>If the state is
<a href="#dom-xmlhttprequest-unsent" title="dom-XMLHttpRequest-UNSENT">UNSENT</a> or
- <a href="#dom-xmlhttprequest-opened" title="dom-XMLHttpRequest-OPENED">OPENED</a>, return the empty
- string and terminate these steps.
-
- <li><p>If the <a href="#error-flag">error flag</a> is set, return the empty string and
- terminate these steps.
+ <a href="#dom-xmlhttprequest-opened" title="dom-XMLHttpRequest-OPENED">OPENED</a>, return the empty string.
+
+ <li><p>If the <a href="#error-flag">error flag</a> is set, return the empty string.
<li><p>Return the HTTP status text.
</ol>
@@ -2012,23 +1989,20 @@
<ol>
<li><p>If the state is
<a href="#dom-xmlhttprequest-unsent" title="dom-XMLHttpRequest-UNSENT">UNSENT</a> or
- <a href="#dom-xmlhttprequest-opened" title="dom-XMLHttpRequest-OPENED">OPENED</a>, return null and
- terminate these steps.
-
- <li><p>If the <a href="#error-flag">error flag</a> is set, return null and terminate
- these steps.
+ <a href="#dom-xmlhttprequest-opened" title="dom-XMLHttpRequest-OPENED">OPENED</a>, return null.
+
+ <li><p>If the <a href="#error-flag">error flag</a> is set, return null.
<li><p>If <var>header</var> is a case-insensitive match for
- <code>Set-Cookie</code> or <code>Set-Cookie2</code>, return null and
- terminate these steps.</li>
+ <code>Set-Cookie</code> or <code>Set-Cookie2</code>, return null.</li>
<li><p>If <var>header</var> is a case-insensitive match for multiple HTTP
response headers, return the values of these headers as a single
concatenated string separated from each other by a
- U+002C COMMA U+0020 SPACE character pair and terminate these steps.
+ U+002C COMMA U+0020 SPACE character pair.
<li><p>If <var>header</var> is a case-insensitive match for a single HTTP
- response header, return the value of that header and terminate these steps.
+ response header, return the value of that header.
<li><p>Return null.</li>
</ol>
@@ -2077,11 +2051,9 @@
<ol>
<li><p>If the state is
<a href="#dom-xmlhttprequest-unsent" title="dom-XMLHttpRequest-UNSENT">UNSENT</a> or
- <a href="#dom-xmlhttprequest-opened" title="dom-XMLHttpRequest-OPENED">OPENED</a>, return the empty
- string and terminate these steps.
-
- <li><p>If the <a href="#error-flag">error flag</a> is set, return the empty string and
- terminate these steps.
+ <a href="#dom-xmlhttprequest-opened" title="dom-XMLHttpRequest-OPENED">OPENED</a>, return the empty string.
+
+ <li><p>If the <a href="#error-flag">error flag</a> is set, return the empty string.
<li><p>Return all the HTTP headers, excluding headers that are a
case-insensitive match for <code>Set-Cookie</code> or
@@ -2175,8 +2147,7 @@
<ol>
<li><p>If the <a href="#response-entity-body">response entity body</a> is null, return an empty
- <code class="external"><a href="http://www.khronos.org/registry/typedarray/specs/latest/#ARRAYBUFFER">ArrayBuffer</a></code> object and terminate
- these steps.</li>
+ <code class="external"><a href="http://www.khronos.org/registry/typedarray/specs/latest/#ARRAYBUFFER">ArrayBuffer</a></code> object.</li>
<li><p>Return an <code class="external"><a href="http://www.khronos.org/registry/typedarray/specs/latest/#ARRAYBUFFER">ArrayBuffer</a></code>
object representing the <a href="#response-entity-body">response entity body</a>.</li>
@@ -2191,7 +2162,7 @@
<ol>
<li><p>If the <a href="#response-entity-body">response entity body</a> is null, return an empty
- <code class="external"><a href="http://dev.w3.org/2006/webapi/FileAPI/#blob">Blob</a></code> object and terminate these steps.</li>
+ <code class="external"><a href="http://dev.w3.org/2006/webapi/FileAPI/#blob">Blob</a></code> object.</li>
<li><p>Return a <code class="external"><a href="http://dev.w3.org/2006/webapi/FileAPI/#blob">Blob</a></code> object
representing the <a href="#response-entity-body">response entity body</a>.
@@ -2208,23 +2179,21 @@
it be the return value of the following algorithm:</p>
<ol>
- <li><p>If the <a href="#response-entity-body">response entity body</a> is null, return null and
- terminate these steps.</li>
+ <li><p>If the <a href="#response-entity-body">response entity body</a> is null, return null.</li>
<li><p>If the
<a class="external" href="http://dev.w3.org/html5/spec/infrastructure.html#javascript-global-environment">JavaScript global environment</a> is a
- <a class="external" href="http://dev.w3.org/html5/spec/webappapis.html#worker-environment">worker environment</a>, return null and
- terminate these steps.
+ <a class="external" href="http://dev.w3.org/html5/spec/webappapis.html#worker-environment">worker environment</a>, return null.
<li><p>If <a href="#final-mime-type">final MIME type</a> is not null,
<code>text/html</code>, <code>text/xml</code>,
<code>application/xml</code>, or does not end in
- <code title="">+xml</code>, return null and terminate these steps.
+ <code title="">+xml</code>, return null.
<li>
<p>If <code title="dom-XMLHttpRequest-responseType"><a href="#dom-xmlhttprequest-responsetype">responseType</a></code> is
the empty string and <a href="#final-mime-type">final MIME type</a> is
- <code>text/html</code>, return null and terminate these steps.
+ <code>text/html</code>, return null.
<p class="note">This is restricted to
<code title="dom-XMLHttpRequest-responseType"><a href="#dom-xmlhttprequest-responsetype">responseType</a></code> being
@@ -2266,8 +2235,7 @@
that represents the result of parsing the
<a href="#response-entity-body">response entity body</a> following the rules set forth in the
XML specifications. If that fails (unsupported character encoding,
- namespace well-formedness error, etc.), return null and terminate these
- steps.
+ namespace well-formedness error, etc.), return null.
<a href="#refsXML">[XML]</a> <a href="#refsXMLNS">[XMLNS]</a>
<p class="note">Scripts in the resulting document tree will not be
@@ -2314,8 +2282,7 @@
following algorithm:</p>
<ol>
- <li><p>If the <a href="#response-entity-body">response entity body</a> is null, return the empty
- string and terminate these steps.</p>
+ <li><p>If the <a href="#response-entity-body">response entity body</a> is null, return the empty string.</p>
<li><p>Let <var>charset</var> be the <a href="#final-charset">final charset</a>.
@@ -2375,14 +2342,12 @@
<a href="#dom-xmlhttprequest-loading" title="dom-XMLHttpRequest-LOADING">LOADING</a> or
<a href="#dom-xmlhttprequest-done" title="dom-XMLHttpRequest-DONE">DONE</a>,
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception and
- terminate these steps.
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception.
<li><p>If parsing <var title="">mime</var> analogously to the value of
the <code>Content-Type</code> header fails,
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> a
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#syntaxerror">SyntaxError</a></code>" exception and terminate
- these steps.
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#syntaxerror">SyntaxError</a></code>" exception.
<li><p>If <var title="">mime</var> is successfully parsed, set
<a href="#override-mime-type">override MIME type</a> to its MIME type,
@@ -2437,16 +2402,14 @@
<a href="#dom-xmlhttprequest-loading" title="dom-XMLHttpRequest-LOADING">LOADING</a> or
<a href="#dom-xmlhttprequest-done" title="dom-XMLHttpRequest-DONE">DONE</a>,
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception and
- terminate these steps.
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception.
<li><p>If the
<a class="external" href="http://dev.w3.org/html5/spec/infrastructure.html#javascript-global-environment">JavaScript global environment</a> is a
<a class="external" href="http://dev.w3.org/html5/spec/webappapis.html#document-environment">document environment</a> and the
<a href="#synchronous-flag">synchronous flag</a> is set,
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidaccesserror">InvalidAccessError</a></code>" exception and
- terminate these steps.
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidaccesserror">InvalidAccessError</a></code>" exception.
<li><p>If the
<a class="external" href="http://dev.w3.org/html5/spec/infrastructure.html#javascript-global-environment">JavaScript global environment</a> is a
@@ -2480,11 +2443,9 @@
<ol>
<li><p>If the state is not
<a href="#dom-xmlhttprequest-loading" title="dom-XMLHttpRequest-LOADING">LOADING</a> or
- <a href="#dom-xmlhttprequest-done" title="dom-XMLHttpRequest-DONE">DONE</a>, return the empty
- string and terminate these steps.</li>
-
- <li><p>If the <a href="#error-flag">error flag</a> is set, return the empty string
- and terminate these steps.</li>
+ <a href="#dom-xmlhttprequest-done" title="dom-XMLHttpRequest-DONE">DONE</a>, return the empty string.</li>
+
+ <li><p>If the <a href="#error-flag">error flag</a> is set, return the empty string.</li>
<li><p>Return the <a href="#text-response-entity-body">text response entity body</a>.</li>
</ol>
@@ -2493,11 +2454,9 @@
<dd>
<ol>
<li><p>If the state is not
- <a href="#dom-xmlhttprequest-done" title="dom-XMLHttpRequest-DONE">DONE</a>, return null and
- terminate these steps.</li>
-
- <li><p>If the <a href="#error-flag">error flag</a> is set, return null and terminate
- these steps.</li>
+ <a href="#dom-xmlhttprequest-done" title="dom-XMLHttpRequest-DONE">DONE</a>, return null.</li>
+
+ <li><p>If the <a href="#error-flag">error flag</a> is set, return null.</li>
<li>
<dl class="switch">
@@ -2556,17 +2515,14 @@
<code title="dom-XMLHttpRequest-responseType"><a href="#dom-xmlhttprequest-responsetype">responseType</a></code> is not
the empty string or "<code title="">text</code>",
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception and
- terminate these steps.
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception.
<li><p>If the state is not
<a href="#dom-xmlhttprequest-loading" title="dom-XMLHttpRequest-LOADING">LOADING</a> or
- <a href="#dom-xmlhttprequest-done" title="dom-XMLHttpRequest-DONE">DONE</a>, return the empty
- string and terminate these steps.</li>
-
- <li><p>If the <a href="#error-flag">error flag</a> is set, return the empty string and
- terminate these steps.</li>
+ <a href="#dom-xmlhttprequest-done" title="dom-XMLHttpRequest-DONE">DONE</a>, return the empty string.</li>
+
+ <li><p>If the <a href="#error-flag">error flag</a> is set, return the empty string.</li>
<li><p>Return the <a href="#text-response-entity-body">text response entity body</a>.</li>
</ol>
@@ -2595,16 +2551,13 @@
<code title="dom-XMLHttpRequest-responseType"><a href="#dom-xmlhttprequest-responsetype">responseType</a></code> is not
the empty string or "<code title="">document</code>",
<a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception and
- terminate these steps.</li>
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception.</li>
<li><p>If the state is not
- <a href="#dom-xmlhttprequest-done" title="dom-XMLHttpRequest-DONE">DONE</a>, return null and
- terminate these steps.
-
- <li><p>If the <a href="#error-flag">error flag</a> is set, return null and terminate
- these steps.
+ <a href="#dom-xmlhttprequest-done" title="dom-XMLHttpRequest-DONE">DONE</a>, return null.
+
+ <li><p>If the <a href="#error-flag">error flag</a> is set, return null.
<li><p>Return the <a href="#document-response-entity-body">document response entity body</a>.</li>
</ol>
--- a/Overview.src.html Fri May 10 00:10:12 2013 +0900
+++ b/Overview.src.html Fri May 10 01:01:05 2013 +0900
@@ -935,30 +935,24 @@
<li><p>If the state is not
<span title="dom-XMLHttpRequest-OPENED">OPENED</span>,
<span data-anolis-spec=dom title=concept-throw>throw</span> an
- "<code data-anolis-spec=dom>InvalidStateError</code>" exception and
- terminate these steps.
+ "<code data-anolis-spec=dom>InvalidStateError</code>" exception.
<li><p>If the <span><code>send()</code> flag</span> is set,
<span data-anolis-spec=dom title=concept-throw>throw</span> an
- "<code data-anolis-spec=dom>InvalidStateError</code>" exception and
- terminate these steps.
+ "<code data-anolis-spec=dom>InvalidStateError</code>" exception.
<li><p>If <var>header</var> does not match the
<span data-anolis-spec=http>field-name</span> production,
<span data-anolis-spec=dom title=concept-throw>throw</span> a
- "<code data-anolis-spec=dom>SyntaxError</code>" exception and terminate
- these steps.
+ "<code data-anolis-spec=dom>SyntaxError</code>" exception.
<li>
<p>If <var>value</var> does not match the
<span data-anolis-spec=http>field-value</span> production,
<span data-anolis-spec=dom title=concept-throw>throw</span> a
- "<code data-anolis-spec=dom>SyntaxError</code>" exception and terminate
- these steps.
-
- <p class=note>The empty string is legal and represents the empty
- header value.</p>
- </li>
+ "<code data-anolis-spec=dom>SyntaxError</code>" exception.
+
+ <p class=note>An empty string represents an empty header field value.
<li>
<p>Terminate these steps if <var>header</var> is a case-insensitive
@@ -1017,11 +1011,6 @@
use of HTTP here in line with contemporary implementations.
</ol>
- <p class=note>See also the
- <code title="dom-XMLHttpRequest-send">send()</code> method regarding user
- agent header handling for caching, authentication, proxies, and
- cookies.</p>
-
<div class="example">
<p>Some simple code demonstrating what happens when setting the same
header twice:</p>
@@ -1073,8 +1062,7 @@
<span data-anolis-spec=html>document environment</span> and the
<span>synchronous flag</span> is set,
<span data-anolis-spec=dom title=concept-throw>throw</span> an
- "<code data-anolis-spec=dom>InvalidAccessError</code>" exception and
- terminate these steps.
+ "<code data-anolis-spec=dom>InvalidAccessError</code>" exception.
<li><p>Set its value to the new value.
</ol>
@@ -1123,26 +1111,22 @@
<span title="dom-XMLHttpRequest-UNSENT">UNSENT</span> or
<span title="dom-XMLHttpRequest-OPENED">OPENED</span>,
<span data-anolis-spec=dom title=concept-throw>throw</span> an
- "<code data-anolis-spec=dom>InvalidStateError</code>" exception and
- terminate these steps.
+ "<code data-anolis-spec=dom>InvalidStateError</code>" exception.
<li><p>If the <span><code>send()</code> flag</span> is set,
<span data-anolis-spec=dom title=concept-throw>throw</span> an
- "<code data-anolis-spec=dom>InvalidStateError</code>" exception and
- terminate these steps.
+ "<code data-anolis-spec=dom>InvalidStateError</code>" exception.
<li><p>If the <span>anonymous flag</span> is set,
<span data-anolis-spec=dom title=concept-throw>throw</span> an
- "<code data-anolis-spec=dom>InvalidAccessError</code>" exception and
- terminate these steps.
+ "<code data-anolis-spec=dom>InvalidAccessError</code>" exception.
<li><p>If the
<span data-anolis-spec=html>JavaScript global environment</span> is a
<span data-anolis-spec=html>document environment</span> and the
<span>synchronous flag</span> is set,
<span data-anolis-spec=dom title=concept-throw>throw</span> an
- "<code data-anolis-spec=dom>InvalidAccessError</code>" exception and
- terminate these steps.
+ "<code data-anolis-spec=dom>InvalidAccessError</code>" exception.
<li><p>Set the
<code title="dom-XMLHttpRequest-withCredentials">withCredentials</code>
@@ -1199,13 +1183,11 @@
<li><p>If the state is not
<span title="dom-XMLHttpRequest-OPENED">OPENED</span>,
<span data-anolis-spec=dom title=concept-throw>throw</span> an
- "<code data-anolis-spec=dom>InvalidStateError</code>" exception and
- terminate these steps.
+ "<code data-anolis-spec=dom>InvalidStateError</code>" exception.
<li><p>If the <span><code>send()</code> flag</span> is set,
<span data-anolis-spec=dom title=concept-throw>throw</span> an
- "<code data-anolis-spec=dom>InvalidStateError</code>" exception and
- terminate these steps.
+ "<code data-anolis-spec=dom>InvalidStateError</code>" exception.
<li><p>If the <span>request method</span> is <code>GET</code> or
<code>HEAD</code>, set <var title>data</var> to null.
@@ -1755,8 +1737,7 @@
<li><p>If the <span>synchronous flag</span> is set,
<span data-anolis-spec=dom title=concept-throw>throw</span> an
- <var>exception</var> exception and terminate the overall set of
- steps.</p></li>
+ <var>exception</var> exception.</p></li>
<li>
<p><span data-anolis-spec=dom title=concept-event-fire>Fire an event</span> named <code title=event-xhr-readystatechange>readystatechange</code>.</p>
@@ -1971,11 +1952,9 @@
<ol>
<li><p>If the state is
<span title="dom-XMLHttpRequest-UNSENT">UNSENT</span> or
- <span title="dom-XMLHttpRequest-OPENED">OPENED</span>, return 0 and
- terminate these steps.
-
- <li><p>If the <span>error flag</span> is set, return 0 and terminate
- these steps.</p></li>
+ <span title="dom-XMLHttpRequest-OPENED">OPENED</span>, return 0.
+
+ <li><p>If the <span>error flag</span> is set, return 0.</p></li>
<li><p>Return the HTTP status code.</p></li>
</ol>
@@ -1995,11 +1974,9 @@
<ol>
<li><p>If the state is
<span title="dom-XMLHttpRequest-UNSENT">UNSENT</span> or
- <span title="dom-XMLHttpRequest-OPENED">OPENED</span>, return the empty
- string and terminate these steps.
-
- <li><p>If the <span>error flag</span> is set, return the empty string and
- terminate these steps.
+ <span title="dom-XMLHttpRequest-OPENED">OPENED</span>, return the empty string.
+
+ <li><p>If the <span>error flag</span> is set, return the empty string.
<li><p>Return the HTTP status text.
</ol>
@@ -2021,23 +1998,20 @@
<ol>
<li><p>If the state is
<span title="dom-XMLHttpRequest-UNSENT">UNSENT</span> or
- <span title="dom-XMLHttpRequest-OPENED">OPENED</span>, return null and
- terminate these steps.
-
- <li><p>If the <span>error flag</span> is set, return null and terminate
- these steps.
+ <span title="dom-XMLHttpRequest-OPENED">OPENED</span>, return null.
+
+ <li><p>If the <span>error flag</span> is set, return null.
<li><p>If <var>header</var> is a case-insensitive match for
- <code>Set-Cookie</code> or <code>Set-Cookie2</code>, return null and
- terminate these steps.</p></li>
+ <code>Set-Cookie</code> or <code>Set-Cookie2</code>, return null.</p></li>
<li><p>If <var>header</var> is a case-insensitive match for multiple HTTP
response headers, return the values of these headers as a single
concatenated string separated from each other by a
- U+002C COMMA U+0020 SPACE character pair and terminate these steps.
+ U+002C COMMA U+0020 SPACE character pair.
<li><p>If <var>header</var> is a case-insensitive match for a single HTTP
- response header, return the value of that header and terminate these steps.
+ response header, return the value of that header.
<li><p>Return null.</p></li>
</ol>
@@ -2086,11 +2060,9 @@
<ol>
<li><p>If the state is
<span title="dom-XMLHttpRequest-UNSENT">UNSENT</span> or
- <span title="dom-XMLHttpRequest-OPENED">OPENED</span>, return the empty
- string and terminate these steps.
-
- <li><p>If the <span>error flag</span> is set, return the empty string and
- terminate these steps.
+ <span title="dom-XMLHttpRequest-OPENED">OPENED</span>, return the empty string.
+
+ <li><p>If the <span>error flag</span> is set, return the empty string.
<li><p>Return all the HTTP headers, excluding headers that are a
case-insensitive match for <code>Set-Cookie</code> or
@@ -2184,8 +2156,7 @@
<ol>
<li><p>If the <span>response entity body</span> is null, return an empty
- <code data-anolis-spec=typedarray>ArrayBuffer</code> object and terminate
- these steps.</p></li>
+ <code data-anolis-spec=typedarray>ArrayBuffer</code> object.</p></li>
<li><p>Return an <code data-anolis-spec=typedarray>ArrayBuffer</code>
object representing the <span>response entity body</span>.</p></li>
@@ -2200,7 +2171,7 @@
<ol>
<li><p>If the <span>response entity body</span> is null, return an empty
- <code data-anolis-spec=fileapi>Blob</code> object and terminate these steps.</p></li>
+ <code data-anolis-spec=fileapi>Blob</code> object.</p></li>
<li><p>Return a <code data-anolis-spec=fileapi>Blob</code> object
representing the <span>response entity body</span>.
@@ -2217,23 +2188,21 @@
it be the return value of the following algorithm:</p>
<ol>
- <li><p>If the <span>response entity body</span> is null, return null and
- terminate these steps.</p></li>
+ <li><p>If the <span>response entity body</span> is null, return null.</p></li>
<li><p>If the
<span data-anolis-spec=html>JavaScript global environment</span> is a
- <span data-anolis-spec=html>worker environment</span>, return null and
- terminate these steps.
+ <span data-anolis-spec=html>worker environment</span>, return null.
<li><p>If <span>final MIME type</span> is not null,
<code>text/html</code>, <code>text/xml</code>,
<code>application/xml</code>, or does not end in
- <code title>+xml</code>, return null and terminate these steps.
+ <code title>+xml</code>, return null.
<li>
<p>If <code title=dom-XMLHttpRequest-responseType>responseType</code> is
the empty string and <span>final MIME type</span> is
- <code>text/html</code>, return null and terminate these steps.
+ <code>text/html</code>, return null.
<p class=note>This is restricted to
<code title=dom-XMLHttpRequest-responseType>responseType</code> being
@@ -2275,8 +2244,7 @@
that represents the result of parsing the
<span>response entity body</span> following the rules set forth in the
XML specifications. If that fails (unsupported character encoding,
- namespace well-formedness error, etc.), return null and terminate these
- steps.
+ namespace well-formedness error, etc.), return null.
<span data-anolis-ref>XML</span> <span data-anolis-ref>XMLNS</span>
<p class=note>Scripts in the resulting document tree will not be
@@ -2323,8 +2291,7 @@
following algorithm:</p>
<ol>
- <li><p>If the <span>response entity body</span> is null, return the empty
- string and terminate these steps.</p>
+ <li><p>If the <span>response entity body</span> is null, return the empty string.</p>
<li><p>Let <var>charset</var> be the <span>final charset</span>.
@@ -2384,14 +2351,12 @@
<span title="dom-XMLHttpRequest-LOADING">LOADING</span> or
<span title="dom-XMLHttpRequest-DONE">DONE</span>,
<span data-anolis-spec=dom title=concept-throw>throw</span> an
- "<code data-anolis-spec=dom>InvalidStateError</code>" exception and
- terminate these steps.
+ "<code data-anolis-spec=dom>InvalidStateError</code>" exception.
<li><p>If parsing <var title>mime</var> analogously to the value of
the <code>Content-Type</code> header fails,
<span data-anolis-spec=dom title=concept-throw>throw</span> a
- "<code data-anolis-spec=dom>SyntaxError</code>" exception and terminate
- these steps.
+ "<code data-anolis-spec=dom>SyntaxError</code>" exception.
<li><p>If <var title>mime</var> is successfully parsed, set
<span>override MIME type</span> to its MIME type,
@@ -2446,16 +2411,14 @@
<span title="dom-XMLHttpRequest-LOADING">LOADING</span> or
<span title="dom-XMLHttpRequest-DONE">DONE</span>,
<span data-anolis-spec=dom title=concept-throw>throw</span> an
- "<code data-anolis-spec=dom>InvalidStateError</code>" exception and
- terminate these steps.
+ "<code data-anolis-spec=dom>InvalidStateError</code>" exception.
<li><p>If the
<span data-anolis-spec=html>JavaScript global environment</span> is a
<span data-anolis-spec=html>document environment</span> and the
<span>synchronous flag</span> is set,
<span data-anolis-spec=dom title=concept-throw>throw</span> an
- "<code data-anolis-spec=dom>InvalidAccessError</code>" exception and
- terminate these steps.
+ "<code data-anolis-spec=dom>InvalidAccessError</code>" exception.
<li><p>If the
<span data-anolis-spec=html>JavaScript global environment</span> is a
@@ -2489,11 +2452,9 @@
<ol>
<li><p>If the state is not
<span title="dom-XMLHttpRequest-LOADING">LOADING</span> or
- <span title="dom-XMLHttpRequest-DONE">DONE</span>, return the empty
- string and terminate these steps.</p></li>
-
- <li><p>If the <span>error flag</span> is set, return the empty string
- and terminate these steps.</p></li>
+ <span title="dom-XMLHttpRequest-DONE">DONE</span>, return the empty string.</p></li>
+
+ <li><p>If the <span>error flag</span> is set, return the empty string.</p></li>
<li><p>Return the <span>text response entity body</span>.</p></li>
</ol>
@@ -2502,11 +2463,9 @@
<dd>
<ol>
<li><p>If the state is not
- <span title="dom-XMLHttpRequest-DONE">DONE</span>, return null and
- terminate these steps.</p></li>
-
- <li><p>If the <span>error flag</span> is set, return null and terminate
- these steps.</p></li>
+ <span title="dom-XMLHttpRequest-DONE">DONE</span>, return null.</p></li>
+
+ <li><p>If the <span>error flag</span> is set, return null.</p></li>
<li>
<dl class=switch>
@@ -2565,17 +2524,14 @@
<code title="dom-XMLHttpRequest-responseType">responseType</code> is not
the empty string or "<code title>text</code>",
<span data-anolis-spec=dom title=concept-throw>throw</span> an
- "<code data-anolis-spec=dom>InvalidStateError</code>" exception and
- terminate these steps.
+ "<code data-anolis-spec=dom>InvalidStateError</code>" exception.
<li><p>If the state is not
<span title="dom-XMLHttpRequest-LOADING">LOADING</span> or
- <span title="dom-XMLHttpRequest-DONE">DONE</span>, return the empty
- string and terminate these steps.</p></li>
-
- <li><p>If the <span>error flag</span> is set, return the empty string and
- terminate these steps.</p></li>
+ <span title="dom-XMLHttpRequest-DONE">DONE</span>, return the empty string.</p></li>
+
+ <li><p>If the <span>error flag</span> is set, return the empty string.</p></li>
<li><p>Return the <span>text response entity body</span>.</p></li>
</ol>
@@ -2604,16 +2560,13 @@
<code title="dom-XMLHttpRequest-responseType">responseType</code> is not
the empty string or "<code title>document</code>",
<span data-anolis-spec=dom title=concept-throw>throw</span> an
- "<code data-anolis-spec=dom>InvalidStateError</code>" exception and
- terminate these steps.</p></li>
+ "<code data-anolis-spec=dom>InvalidStateError</code>" exception.</p></li>
<li><p>If the state is not
- <span title="dom-XMLHttpRequest-DONE">DONE</span>, return null and
- terminate these steps.
-
- <li><p>If the <span>error flag</span> is set, return null and terminate
- these steps.
+ <span title="dom-XMLHttpRequest-DONE">DONE</span>, return null.
+
+ <li><p>If the <span>error flag</span> is set, return null.
<li><p>Return the <span>document response entity body</span>.</p></li>
</ol>