Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Remove the terminate send()/abort() concept in favor of using the err…

  • Loading branch information...
commit ff1071880b14f2d999877ff757c7d49d3f217de1 1 parent 0ec77bf
Anne van Kesteren authored
78  Overview.html
@@ -5,15 +5,15 @@
5 5
 
6 6
 <div class="head">
7 7
 
8  
-<p><a class="logo" href="//www.whatwg.org/"><img alt="WHATWG" height="100" src="//resources.whatwg.org/logo-xhr.svg" width="100"></a></p>
  8
+<p><a class="logo" href="//www.whatwg.org/"><img alt="WHATWG" height="100" src="//resources.whatwg.org/logo-xhr.svg" width="100"></a>
9 9
 <h1 class="head" id="xmlhttprequest-ls">XMLHttpRequest</h1>
10  
-<h2 class="no-num no-toc" id="living-standard-—-last-updated-19-december-2012">Living Standard — Last Updated 19 December 2012</h2>
  10
+<h2 class="no-num no-toc" id="living-standard-—-last-updated-18-february-2013">Living Standard — Last Updated 18 February 2013</h2>
11 11
 
12 12
 <dl>
13  
- <dt>This Version:</dt>
14  
- <dd><a href="http://xhr.spec.whatwg.org/">http://xhr.spec.whatwg.org/</a></dd>
  13
+ <dt>This Version:
  14
+ <dd><a href="http://xhr.spec.whatwg.org/">http://xhr.spec.whatwg.org/</a>
15 15
 
16  
- <dt>Participate:</dt>
  16
+ <dt>Participate:
17 17
  <dd>Send feedback to
18 18
   <a href="mailto:public-webapps@w3.org?subject==%5Bxhr%5D%20">public-webapps@w3.org</a>
19 19
   (<a href="http://lists.w3.org/Archives/Public/public-webapps/">archives</a>) or
@@ -25,9 +25,10 @@ <h2 class="no-num no-toc" id="living-standard-—-last-updated-19-december-2012"
25 25
  <dt>Version History:
26 26
  <dd><a href="https://github.com/whatwg/xhr/commits">https://github.com/whatwg/xhr/commits</a>
27 27
 
28  
- <dt>Editor:</dt>
  28
+ <dt>Editor:
29 29
  <dd><a href="http://annevankesteren.nl/">Anne van Kesteren</a>
30  
-  &lt;<a href="mailto:annevk@annevk.nl">annevk@annevk.nl</a>&gt;</dd>
  30
+  (<a href="http://www.mozilla.org/">Mozilla</a>)
  31
+  &lt;<a href="mailto:annevk@annevk.nl">annevk@annevk.nl</a>&gt;
31 32
 </dl>
32 33
 
33 34
 <script async="" src="//resources.whatwg.org/file-bug.js"></script>
@@ -35,7 +36,7 @@ <h2 class="no-num no-toc" id="living-standard-—-last-updated-19-december-2012"
35 36
 <p class="copyright"><a href="http://creativecommons.org/publicdomain/zero/1.0/" rel="license"><img alt="CC0" src="http://i.creativecommons.org/p/zero/1.0/80x15.png"></a>
36 37
 To the extent possible under law, the editor has waived all copyright and
37 38
 related or neighboring rights to this work. In addition, as of
38  
-19 December 2012, the editor has made this specification available
  39
+18 February 2013, the editor has made this specification available
39 40
 under the
40 41
 <a href="http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0" rel="license">Open Web Foundation Agreement Version 1.0</a>,
41 42
 which is available at
@@ -520,8 +521,7 @@ <h3 id="states"><span class="secno">4.5 </span>States</h3>
520 521
   <a href="#dom-xmlhttprequest-opened" title="dom-XMLHttpRequest-OPENED">OPENED</a> state.
521 522
 
522 523
   <p>The <dfn id="error-flag">error flag</dfn> indicates some type of
523  
-  network error or request abortion. It is initially unset and is used
524  
-  during the <a href="#dom-xmlhttprequest-done" title="dom-XMLHttpRequest-DONE">DONE</a> state.
  524
+  network error or fetch termination. It is initially unset.
525 525
 
526 526
 
527 527
 <h3 id="request"><span class="secno">4.6 </span>Request</h3>
@@ -702,9 +702,11 @@ <h4 id="the-open()-method"><span class="secno">4.6.1 </span>The <code title="">o
702 702
    "<code class="external"><a href="http://dom.spec.whatwg.org/#invalidaccesserror">InvalidAccessError</a></code>" exception and
703 703
    terminate these steps.
704 704
 
705  
-   <li><p><a href="#terminate-abort()" title="terminate abort()">Terminate the <code>abort()</code> algorithm</a>.</li>
706  
-
707  
-   <li><p><a href="#terminate-send()" title="terminate send()">Terminate the <code>send()</code> algorithm</a>.</li>
  705
+   <li>
  706
+    <p>Set the <a href="#error-flag">error flag</a>.
  707
+    
  708
+    <p class="note">This is meaningless unless the 
  709
+    <code title="dom-XMLHttpRequest-send"><a href="#dom-xmlhttprequest-send">send()</a></code> algorithm is running.
708 710
 
709 711
    <li><p>The user agent should cancel any network
710 712
    activity for which the object is responsible.</li>
@@ -1043,18 +1045,8 @@ <h4 id="the-send()-method"><span class="secno">4.6.6 </span>The <code title="">s
1043 1045
    </dd>
1044 1046
   </dl>
1045 1047
 
1046  
-  <p>The
1047  
-  <dfn id="dom-xmlhttprequest-send" title="dom-XMLHttpRequest-send"><code>send(<var>data</var>)</code></dfn>
1048  
-  method must run these steps (unless otherwise noted). This algorithm can
1049  
-  be <dfn id="terminate-send()" title="terminate send()">terminated</dfn> by invoking the
1050  
-  <code title="dom-XMLHttpRequest-open"><a href="#dom-xmlhttprequest-open">open()</a></code> or
1051  
-  <code title="dom-XMLHttpRequest-abort"><a href="#dom-xmlhttprequest-abort">abort()</a></code> method. When it is
1052  
-  <a href="#terminate-send()" title="terminate send()">terminated</a> the user agent
1053  
-  must terminate the algorithm after finishing the step it is on.</p>
1054  
-
1055  
-  <p class="note">The <code title="dom-XMLHttpRequest-send"><a href="#dom-xmlhttprequest-send">send()</a></code>
1056  
-  algorithm can only be terminated if the <a href="#synchronous-flag">synchronous flag</a> is
1057  
-  unset and only after the method call has returned.</p>
  1048
+<p>The <dfn id="dom-xmlhttprequest-send" title="dom-XMLHttpRequest-send"><code>send(<var>data</var>)</code></dfn> 
  1049
+method must run these steps (unless otherwise noted):
1058 1050
 
1059 1051
   <ol>
1060 1052
    <li><p>If the state is not
@@ -1448,6 +1440,9 @@ <h4 id="infrastructure-for-the-send()-method"><span class="secno">4.6.7 </span>I
1448 1440
   <p>The <dfn id="same-origin-request-event-rules">same-origin request event rules</dfn> are as follows:</p>
1449 1441
 
1450 1442
   <dl class="switch">
  1443
+   <dt>If the <a href="#error-flag">error flag</a> is set
  1444
+   <dd><p>Terminate these steps.
  1445
+   
1451 1446
    <dt>If the response has an HTTP status code of 301, 302, 303, 307, or 308
1452 1447
    <dd>
1453 1448
     <p>If the redirect violates infinite loop precautions this is a
@@ -1526,6 +1521,9 @@ <h4 id="infrastructure-for-the-send()-method"><span class="secno">4.6.7 </span>I
1526 1521
   <p>The <dfn id="cross-origin-request-event-rules">cross-origin request event rules</dfn> are as follows:</p>
1527 1522
 
1528 1523
   <dl class="switch">
  1524
+   <dt>If the <a href="#error-flag">error flag</a> is set
  1525
+   <dd><p>Terminate these steps.
  1526
+
1529 1527
    <dt>If the <a class="external" href="http://fetch.spec.whatwg.org/#cross-origin-request-status">cross-origin request status</a>
1530 1528
    is <i>preflight complete</i> and the <a href="#synchronous-flag">synchronous flag</a> is
1531 1529
    unset</dt>
@@ -1739,28 +1737,18 @@ <h4 id="infrastructure-for-the-send()-method"><span class="secno">4.6.7 </span>I
1739 1737
 
1740 1738
 
1741 1739
 
1742  
-  <h4 id="the-abort()-method"><span class="secno">4.6.8 </span>The <code title="">abort()</code> method</h4>
  1740
+<h4 id="the-abort()-method"><span class="secno">4.6.8 </span>The <code title="">abort()</code> method</h4>
1743 1741
 
1744 1742
   <dl class="domintro">
1745 1743
    <dt><code><var title="">client</var> . <a href="#dom-xmlhttprequest-abort" title="dom-XMLHttpRequest-abort">abort</a>()</code>
1746 1744
    <dd>Cancels any network activity.
1747 1745
   </dl>
1748 1746
 
1749  
-  <p>The
1750  
-  <dfn id="dom-xmlhttprequest-abort" title="dom-XMLHttpRequest-abort"><code>abort()</code></dfn>
1751  
-  method must run these steps (unless otherwise noted). This algorithm can
1752  
-  be <dfn id="terminate-abort()" title="terminate abort()">terminated</dfn> by invoking the
1753  
-  <code title="dom-XMLHttpRequest-open"><a href="#dom-xmlhttprequest-open">open()</a></code> method. When it is
1754  
-  <a href="#terminate-abort()" title="terminate abort()">terminated</a> the user agent
1755  
-  must terminate the algorithm after finishing the step it is on.
1756  
-
1757  
-  <p class="note">The <code title="dom-XMLHttpRequest-abort"><a href="#dom-xmlhttprequest-abort">abort()</a></code>
1758  
-  algorithm can only be terminated by invoking
1759  
-  <code title="dom-XMLHttpRequest-open"><a href="#dom-xmlhttprequest-open">open()</a></code> from an event
1760  
-  handler.</p>
  1747
+<p>The <dfn id="dom-xmlhttprequest-abort" title="dom-XMLHttpRequest-abort"><code>abort()</code></dfn> method must run 
  1748
+these steps (unless otherwise noted):
1761 1749
 
1762 1750
   <ol>
1763  
-   <li><p><a href="#terminate-send()" title="terminate send()">Terminate the <code>send()</code> algorithm</a>.</li>
  1751
+   <li><p>Set the <a href="#error-flag">error flag</a>.
1764 1752
 
1765 1753
    <li><p>The user agent should cancel any network
1766 1754
    activity for which the object is responsible.</li>
@@ -1771,10 +1759,6 @@ <h4 id="the-abort()-method"><span class="secno">4.6.8 </span>The <code title="">
1771 1759
    the <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#task-queue" title="task queue">task queues</a>,
1772 1760
    then remove them.
1773 1761
 
1774  
-   <li><p>Set the <a href="#error-flag">error flag</a>.
1775  
-
1776  
-   <li><p>Unset the <a href="#synchronous-flag">synchronous flag</a>.
1777  
-
1778 1762
    <li>
1779 1763
     <p>If the state is <a href="#dom-xmlhttprequest-unsent" title="dom-XMLHttpRequest-UNSENT">UNSENT</a>,
1780 1764
     <a href="#dom-xmlhttprequest-opened" title="dom-XMLHttpRequest-OPENED">OPENED</a> with the
@@ -1816,14 +1800,10 @@ <h4 id="the-abort()-method"><span class="secno">4.6.8 </span>The <code title="">
1816 1800
 
1817 1801
     </ol>
1818 1802
 
1819  
-
1820  
-   </li>
1821  
-
1822 1803
    <li>
1823 1804
     <p>Change the state to <a href="#dom-xmlhttprequest-unsent" title="dom-XMLHttpRequest-UNSENT">UNSENT</a>.</p>
1824 1805
 
1825 1806
     <p class="note">No <code title="event-xhr-readystatechange"><a href="#event-xhr-readystatechange">readystatechange</a></code> event is dispatched.</p>
1826  
-   </li>
1827 1807
   </ol>
1828 1808
 
1829 1809
 
@@ -2167,8 +2147,7 @@ <h4 id="response-entity-body-0"><span class="secno">4.7.5 </span>Response entity
2167 2147
    <a class="external" href="http://dom.spec.whatwg.org/#concept-document-url" title="concept-document-url">URL</a> to
2168 2148
    <a href="#request-url">request URL</a>.
2169 2149
 
2170  
-   <li><p>Set <var title="">document</var>'s
2171  
-   <a class="external" href="http://dom.spec.whatwg.org/#concept-document-origin" title="concept-document-origin">origin</a> to
  2150
+   <li><p>Set <var title="">document</var>'s <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#origin">origin</a> to
2172 2151
    <a href="#source-origin">source origin</a>.
2173 2152
 
2174 2153
    <li><p>Return <var title="">document</var>.
@@ -2977,6 +2956,7 @@ <h2 class="no-num" id="acknowledgments">Acknowledgments</h2>
2977 2956
   David Levin,
2978 2957
   Dean Jackson,
2979 2958
   Denis Sureau,
  2959
+  Dominik Röttsches,
2980 2960
   Doug Schepers,
2981 2961
   Douglas Livingstone,
2982 2962
   Elliotte Harold,
76  Overview.src.html
... ...
@@ -1,5 +1,5 @@
1 1
 <!doctype html>
2  
-<html lang="en-US">
  2
+<html lang=en-US>
3 3
 <meta charset=utf-8>
4 4
 <title>XMLHttpRequest Standard</title>
5 5
 <link href=http://www.whatwg.org/style/specification rel=stylesheet>
@@ -7,15 +7,15 @@
7 7
 
8 8
 <div class="head">
9 9
 
10  
-<p><a class=logo href=//www.whatwg.org/><img alt=WHATWG src=//resources.whatwg.org/logo-xhr.svg width=100 height=100></a></p>
  10
+<p><a class=logo href=//www.whatwg.org/><img alt=WHATWG src=//resources.whatwg.org/logo-xhr.svg width=100 height=100></a>
11 11
 <h1 class="head" id="xmlhttprequest-ls">XMLHttpRequest</h1>
12 12
 <h2 class="no-num no-toc">Living Standard &mdash; Last Updated [DATE: 3 August 2002]</h2>
13 13
 
14 14
 <dl>
15  
- <dt>This Version:</dt>
16  
- <dd><a href=http://xhr.spec.whatwg.org/>http://xhr.spec.whatwg.org/</a></dd>
  15
+ <dt>This Version:
  16
+ <dd><a href=http://xhr.spec.whatwg.org/>http://xhr.spec.whatwg.org/</a>
17 17
 
18  
- <dt>Participate:</dt>
  18
+ <dt>Participate:
19 19
  <dd>Send feedback to
20 20
   <a href="mailto:public-webapps@w3.org?subject==%5Bxhr%5D%20">public-webapps@w3.org</a>
21 21
   (<a href="http://lists.w3.org/Archives/Public/public-webapps/">archives</a>) or
@@ -27,9 +27,10 @@ <h2 class="no-num no-toc">Living Standard &mdash; Last Updated [DATE: 3 August 2
27 27
  <dt>Version History:
28 28
  <dd><a href=https://github.com/whatwg/xhr/commits>https://github.com/whatwg/xhr/commits</a>
29 29
 
30  
- <dt>Editor:</dt>
  30
+ <dt>Editor:
31 31
  <dd><a href="http://annevankesteren.nl/">Anne van Kesteren</a>
32  
-  &lt;<a href="mailto:annevk@annevk.nl">annevk@annevk.nl</a>&gt;</dd>
  32
+  (<a href=http://www.mozilla.org/>Mozilla</a>)
  33
+  &lt;<a href="mailto:annevk@annevk.nl">annevk@annevk.nl</a>>
33 34
 </dl>
34 35
 
35 36
 <script src=//resources.whatwg.org/file-bug.js async></script>
@@ -472,8 +473,7 @@ <h3 id="states">States</h3>
472 473
   <span title="dom-XMLHttpRequest-OPENED">OPENED</span> state.
473 474
 
474 475
   <p>The <dfn id="error-flag">error flag</dfn> indicates some type of
475  
-  network error or request abortion. It is initially unset and is used
476  
-  during the <span title="dom-XMLHttpRequest-DONE">DONE</span> state.
  476
+  network error or fetch termination. It is initially unset.
477 477
 
478 478
 
479 479
 <h3 id="request">Request</h3>
@@ -654,9 +654,11 @@ <h3 id="request">Request</h3>
654 654
    "<code data-anolis-spec=dom>InvalidAccessError</code>" exception and
655 655
    terminate these steps.
656 656
 
657  
-   <li><p><span title="terminate abort()">Terminate the <code>abort()</code> algorithm</span>.</p></li>
658  
-
659  
-   <li><p><span title="terminate send()">Terminate the <code>send()</code> algorithm</span>.</p></li>
  657
+   <li>
  658
+    <p>Set the <span>error flag</span>.
  659
+    
  660
+    <p class=note>This is meaningless unless the 
  661
+    <code title=dom-XMLHttpRequest-send>send()</code> algorithm is running.
660 662
 
661 663
    <li><p>The user agent should cancel any network
662 664
    activity for which the object is responsible.</p></li>
@@ -995,18 +997,8 @@ <h3 id="request">Request</h3>
995 997
    </dd>
996 998
   </dl>
997 999
 
998  
-  <p>The
999  
-  <dfn title="dom-XMLHttpRequest-send"><code>send(<var>data</var>)</code></dfn>
1000  
-  method must run these steps (unless otherwise noted). This algorithm can
1001  
-  be <dfn title="terminate send()">terminated</dfn> by invoking the
1002  
-  <code title="dom-XMLHttpRequest-open">open()</code> or
1003  
-  <code title="dom-XMLHttpRequest-abort">abort()</code> method. When it is
1004  
-  <span title="terminate send()">terminated</span> the user agent
1005  
-  must terminate the algorithm after finishing the step it is on.</p>
1006  
-
1007  
-  <p class=note>The <code title="dom-XMLHttpRequest-send">send()</code>
1008  
-  algorithm can only be terminated if the <span>synchronous flag</span> is
1009  
-  unset and only after the method call has returned.</p>
  1000
+<p>The <dfn title="dom-XMLHttpRequest-send"><code>send(<var>data</var>)</code></dfn> 
  1001
+method must run these steps (unless otherwise noted):
1010 1002
 
1011 1003
   <ol>
1012 1004
    <li><p>If the state is not
@@ -1400,6 +1392,9 @@ <h3 id="request">Request</h3>
1400 1392
   <p>The <dfn>same-origin request event rules</dfn> are as follows:</p>
1401 1393
 
1402 1394
   <dl class=switch>
  1395
+   <dt>If the <span>error flag</span> is set
  1396
+   <dd><p>Terminate these steps.
  1397
+   
1403 1398
    <dt>If the response has an HTTP status code of 301, 302, 303, 307, or 308
1404 1399
    <dd>
1405 1400
     <p>If the redirect violates infinite loop precautions this is a
@@ -1478,6 +1473,9 @@ <h3 id="request">Request</h3>
1478 1473
   <p>The <dfn>cross-origin request event rules</dfn> are as follows:</p>
1479 1474
 
1480 1475
   <dl class=switch>
  1476
+   <dt>If the <span>error flag</span> is set
  1477
+   <dd><p>Terminate these steps.
  1478
+
1481 1479
    <dt>If the <span data-anolis-spec=cors>cross-origin request status</span>
1482 1480
    is <i>preflight complete</i> and the <span>synchronous flag</span> is
1483 1481
    unset</dt>
@@ -1691,28 +1689,18 @@ <h3 id="request">Request</h3>
1691 1689
 
1692 1690
 
1693 1691
 
1694  
-  <h4>The <code title>abort()</code> method</h4>
  1692
+<h4>The <code title>abort()</code> method</h4>
1695 1693
 
1696 1694
   <dl class=domintro>
1697 1695
    <dt><code><var title>client</var> . <span title=dom-XMLHttpRequest-abort>abort</span>()</code>
1698 1696
    <dd>Cancels any network activity.
1699 1697
   </dl>
1700 1698
 
1701  
-  <p>The
1702  
-  <dfn title="dom-XMLHttpRequest-abort"><code>abort()</code></dfn>
1703  
-  method must run these steps (unless otherwise noted). This algorithm can
1704  
-  be <dfn title="terminate abort()">terminated</dfn> by invoking the
1705  
-  <code title="dom-XMLHttpRequest-open">open()</code> method. When it is
1706  
-  <span title="terminate abort()">terminated</span> the user agent
1707  
-  must terminate the algorithm after finishing the step it is on.
1708  
-
1709  
-  <p class=note>The <code title="dom-XMLHttpRequest-abort">abort()</code>
1710  
-  algorithm can only be terminated by invoking
1711  
-  <code title="dom-XMLHttpRequest-open">open()</code> from an event
1712  
-  handler.</p>
  1699
+<p>The <dfn title="dom-XMLHttpRequest-abort"><code>abort()</code></dfn> method must run 
  1700
+these steps (unless otherwise noted):
1713 1701
 
1714 1702
   <ol>
1715  
-   <li><p><span title="terminate send()">Terminate the <code>send()</code> algorithm</span>.</p></li>
  1703
+   <li><p>Set the <span>error flag</span>.
1716 1704
 
1717 1705
    <li><p>The user agent should cancel any network
1718 1706
    activity for which the object is responsible.</p></li>
@@ -1723,10 +1711,6 @@ <h3 id="request">Request</h3>
1723 1711
    the <span data-anolis-spec=html title="task queue">task queues</span>,
1724 1712
    then remove them.
1725 1713
 
1726  
-   <li><p>Set the <span>error flag</span>.
1727  
-
1728  
-   <li><p>Unset the <span>synchronous flag</span>.
1729  
-
1730 1714
    <li>
1731 1715
     <p>If the state is <span title="dom-XMLHttpRequest-UNSENT">UNSENT</span>,
1732 1716
     <span title="dom-XMLHttpRequest-OPENED">OPENED</span> with the
@@ -1768,14 +1752,10 @@ <h3 id="request">Request</h3>
1768 1752
 
1769 1753
     </ol>
1770 1754
 
1771  
-
1772  
-   </li>
1773  
-
1774 1755
    <li>
1775 1756
     <p>Change the state to <span title="dom-XMLHttpRequest-UNSENT">UNSENT</span>.</p>
1776 1757
 
1777 1758
     <p class=note>No <code title="event-xhr-readystatechange">readystatechange</code> event is dispatched.</p>
1778  
-   </li>
1779 1759
   </ol>
1780 1760
 
1781 1761
 
@@ -2119,8 +2099,7 @@ <h3 id="response">Response</h3>
2119 2099
    <span data-anolis-spec=dom title=concept-document-url>URL</span> to
2120 2100
    <span>request URL</span>.
2121 2101
 
2122  
-   <li><p>Set <var title>document</var>'s
2123  
-   <span data-anolis-spec=dom title=concept-document-origin>origin</span> to
  2102
+   <li><p>Set <var title>document</var>'s <span data-anolis-spec=html>origin</span> to
2124 2103
    <span>source origin</span>.
2125 2104
 
2126 2105
    <li><p>Return <var title>document</var>.
@@ -2871,6 +2850,7 @@ <h2 class="no-num" id="acknowledgments">Acknowledgments</h2>
2871 2850
   David Levin,
2872 2851
   Dean Jackson,
2873 2852
   Denis Sureau,
  2853
+  Dominik Röttsches,
2874 2854
   Doug Schepers,
2875 2855
   Douglas Livingstone,
2876 2856
   Elliotte Harold,

0 notes on commit ff10718

Please sign in to comment.
Something went wrong with that request. Please try again.