[html5] r4426 - [giow] (1) Change the WebSocket API to never change readyState asynchronously.

whatwg at whatwg.org whatwg at whatwg.org
Wed Dec 9 10:06:52 PST 2009


Author: ianh
Date: 2009-12-09 10:06:48 -0800 (Wed, 09 Dec 2009)
New Revision: 4426

Modified:
   complete.html
   source
Log:
[giow] (1) Change the WebSocket API to never change readyState asynchronously.

Modified: complete.html
===================================================================
--- complete.html	2009-12-09 15:02:38 UTC (rev 4425)
+++ complete.html	2009-12-09 18:06:48 UTC (rev 4426)
@@ -65430,20 +65430,19 @@
   <code title=dom-WebSocket-CONNECTING><a href=#dom-websocket-connecting>CONNECTING</a></code> (0).</p>
 
   <p>The <dfn id=dom-websocket-send title=dom-WebSocket-send><code>send(<var title="">data</var>)</code></dfn> method transmits data using the
-  connection. If the connection has not yet been established (<code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> is <code title=dom-WebSocket-CONNECTING><a href=#dom-websocket-connecting>CONNECTING</a></code>), it must raise
-  an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception. (No exception is raised
-  if the connection was once established but has subsequently been
-  closed, however.) If the <var title="">data</var> argument has any
-  unpaired surrogates, then it must raise <code><a href=#syntax_err>SYNTAX_ERR</a></code>. If
-  the connection <em>is</em> established, and the string has no
-  unpaired surrogates, then the user agent must <a href=#send-data-using-the-web-socket>send <var title="">data</var> using the Web Socket</a>. If the data cannot
-  be sent, e.g. because it would need to be buffered but the buffer is
-  full, the user agent must <a href=#close-the-web-socket-connection>close the Web Socket
-  connection</a>. The method must then return true if the
-  connection is still established (and the data was queued or sent
-  successfully), or false if the connection is closed (e.g. because
-  the user agent just had a buffer overflow and failed to send the
-  data).</p>
+  connection. If the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute is
+  <code title=dom-WebSocket-CONNECTING><a href=#dom-websocket-connecting>CONNECTING</a></code>, it must
+  raise an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception. If the <var title="">data</var> argument has any unpaired surrogates, then it
+  must raise <code><a href=#syntax_err>SYNTAX_ERR</a></code>. If the connection is
+  established, and the string has no unpaired surrogates, then the
+  user agent must <a href=#send-data-using-the-web-socket>send <var title="">data</var> using the Web
+  Socket</a>. If the data cannot be sent, e.g. because it would
+  need to be buffered but the buffer is full, the user agent must
+  <a href=#close-the-web-socket-connection>close the Web Socket connection</a>. The method must then
+  return true if the connection is still established (and the data was
+  queued or sent successfully), or false if the connection is closed
+  (e.g. because the user agent just had a buffer overflow and failed
+  to send the data).</p>
 
   <p>The <dfn id=dom-websocket-close title=dom-WebSocket-close><code>close()</code></dfn>
   method must <a href=#close-the-web-socket-connection>close the Web Socket connection</a> or
@@ -65470,7 +65469,7 @@
   </table><h4 id=feedback-from-the-protocol><span class=secno>10.3.3 </span>Feedback from the protocol</h4>
 
   <p>When the <i><a href=#web-socket-connection-is-established>Web Socket connection is established</a></i>, the user
-  agent must run the following steps:</p>
+  agent must <a href=#queue-a-task>queue a task</a> to run the following steps:</p>
 
   <ol><li>
 
@@ -65481,9 +65480,8 @@
 
    <li>
 
-    <p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
-    named <code title=event-open>open</code> at the
-    <code><a href=#websocket>WebSocket</a></code> object.</p>
+    <p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-open>open</code> at the <code><a href=#websocket>WebSocket</a></code>
+    object.</p>
 
    </li>
 
@@ -65493,11 +65491,10 @@
   the <code><a href=#websocket>WebSocket</a></code> object.</p>
 
   <hr><p id=closeWebSocket>When the <i><a href=#web-socket-connection-is-closed>Web Socket connection is
-  closed</a></i>, the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's value
-  must be changed to <code title=dom-WebSocket-CLOSED><a href=#dom-websocket-closed>CLOSED</a></code>
-  (2), and the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire
-  a simple event</a> named <code title=event-close>close</code> at the
-  <code><a href=#websocket>WebSocket</a></code> object.</p>
+  closed</a></i>, must <a href=#queue-a-task>queue a task</a> to change the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's value
+  to <code title=dom-WebSocket-CLOSED><a href=#dom-websocket-closed>CLOSED</a></code> (2) and then
+  <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-close>close</code> at the <code><a href=#websocket>WebSocket</a></code>
+  object.</p>
 
   <hr><p>The <a href=#task-source>task source</a> for all <a href=#concept-task title=concept-task>tasks</a> <a href=#queue-a-task title="queue a
   task">queued</a> in this section is the <dfn id=web-socket-task-source>Web Socket task

Modified: source
===================================================================
--- source	2009-12-09 15:02:38 UTC (rev 4425)
+++ source	2009-12-09 18:06:48 UTC (rev 4426)
@@ -74619,23 +74619,21 @@
 
   <p>The <dfn title="dom-WebSocket-send"><code>send(<var
   title="">data</var>)</code></dfn> method transmits data using the
-  connection. If the connection has not yet been established (<code
-  title="dom-WebSocket-readyState">readyState</code> is <code
-  title="dom-WebSocket-CONNECTING">CONNECTING</code>), it must raise
-  an <code>INVALID_STATE_ERR</code> exception. (No exception is raised
-  if the connection was once established but has subsequently been
-  closed, however.) If the <var title="">data</var> argument has any
-  unpaired surrogates, then it must raise <code>SYNTAX_ERR</code>. If
-  the connection <em>is</em> established, and the string has no
-  unpaired surrogates, then the user agent must <span>send <var
-  title="">data</var> using the Web Socket</span>. If the data cannot
-  be sent, e.g. because it would need to be buffered but the buffer is
-  full, the user agent must <span>close the Web Socket
-  connection</span>. The method must then return true if the
-  connection is still established (and the data was queued or sent
-  successfully), or false if the connection is closed (e.g. because
-  the user agent just had a buffer overflow and failed to send the
-  data).</p>
+  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. If the <var
+  title="">data</var> argument has any unpaired surrogates, then it
+  must raise <code>SYNTAX_ERR</code>. If the connection is
+  established, and the string has no unpaired surrogates, then the
+  user agent must <span>send <var title="">data</var> using the Web
+  Socket</span>. If the data cannot be sent, e.g. because it would
+  need to be buffered but the buffer is full, the user agent must
+  <span>close the Web Socket connection</span>. The method must then
+  return true if the connection is still established (and the data was
+  queued or sent successfully), or false if the connection is closed
+  (e.g. because the user agent just had a buffer overflow and failed
+  to send the data).</p>
 
   <p>The <dfn
   title="dom-WebSocket-close"><code>close()</code></dfn>
@@ -74678,7 +74676,7 @@
   <h4>Feedback from the protocol</h4>
 
   <p>When the <i>Web Socket connection is established</i>, the user
-  agent must run the following steps:</p>
+  agent must <span>queue a task</span> to run the following steps:</p>
 
   <ol>
 
@@ -74692,9 +74690,9 @@
 
    <li>
 
-    <p><span>Queue a task</span> to <span>fire a simple event</span>
-    named <code title="event-open">open</code> at the
-    <code>WebSocket</code> object.</p>
+    <p><span>Fire a simple event</span> named <code
+    title="event-open">open</code> at the <code>WebSocket</code>
+    object.</p>
 
    </li>
 
@@ -74714,13 +74712,12 @@
   <hr>
 
   <p id="closeWebSocket">When the <i>Web Socket connection is
-  closed</i>, the <code
+  closed</i>, must <span>queue a task</span> to change the <code
   title="dom-WebSocket-readyState">readyState</code> attribute's value
-  must be changed to <code title="dom-WebSocket-CLOSED">CLOSED</code>
-  (2), and the user agent must <span>queue a task</span> to <span>fire
-  a simple event</span> named <code
-  title="event-close">close</code> at the
-  <code>WebSocket</code> object.</p>
+  to <code title="dom-WebSocket-CLOSED">CLOSED</code> (2) and then
+  <span>fire a simple event</span> named <code
+  title="event-close">close</code> at the <code>WebSocket</code>
+  object.</p>
 
   <hr>
 




More information about the Commit-Watchers mailing list