W3C home > Mailing lists > Public > public-html-commits@w3.org > December 2009

html5/websockets Overview.html,1.135,1.136

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 09 Dec 2009 18:06:57 +0000
To: public-html-commits@w3.org
Message-Id: <E1NIQwD-0007AW-Vv@lionel-hutz.w3.org>
Update of /sources/public/html5/websockets
In directory hutz:/tmp/cvs-serv27541

Modified Files:
	Overview.html 
Log Message:
Change the WebSocket API to never change readyState asynchronously. (whatwg r4426)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/websockets/Overview.html,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -d -r1.135 -r1.136
--- Overview.html	7 Dec 2009 10:23:20 -0000	1.135
+++ Overview.html	9 Dec 2009 18:06:55 -0000	1.136
@@ -174,7 +174,7 @@
    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
    <h1>The Web Sockets API</h1>
 
-   <h2 class="no-num no-toc" id="editor-s-draft-7-december-2009">Editor's Draft 7 December 2009</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-9-december-2009">Editor's Draft 9 December 2009</h2>
    <dl><dt>Latest Published Version:</dt>
     <dd><a href="http://www.w3.org/TR/websockets/">http://www.w3.org/TR/websockets/</a></dd>
     <dt>Latest Editor's Draft:</dt>
@@ -246,7 +246,7 @@
   Working Group</a> is the W3C working group responsible for this
   specification's progress along the W3C Recommendation track.
 
-  This specification is the 7 December 2009 Editor's Draft.
+  This specification is the 9 December 2009 Editor's Draft.
   <p>This specification is being developed in conjunction with an
   Internet Draft for a wire protocol, the Web Socket Protocol,
   available from the IETF at the following location:<ul><li>WebSocket Protocol Internet-Draft: <a href="http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol">http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol</a></li>
@@ -414,20 +414,19 @@
 
   </dl><p>When the object is created its <code title="dom-WebSocket-readyState"><a href="#dom-websocket-readystate">readyState</a></code> must be set to
   <code title="dom-WebSocket-CONNECTING"><a href="#dom-websocket-connecting">CONNECTING</a></code> (0).<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>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>The <dfn id="dom-websocket-close" title="dom-WebSocket-close"><code>close()</code></dfn>
+  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>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>The <dfn id="dom-websocket-close" title="dom-WebSocket-close"><code>close()</code></dfn>
   method must <span>close the Web Socket connection</span> or
   connection attempt, if any. If the connection is already closed, it
   must do nothing.<p class="note">Closing the connection eventually causes a <code title="event-close">close</code> event to be fired and the <code title="dom-WebSocket-readyState"><a href="#dom-websocket-readystate">readyState</a></code> attribute's value
@@ -442,7 +441,7 @@
     <tr><td><dfn id="handler-websocket-onmessage" title="handler-WebSocket-onmessage"><code>onmessage</code></dfn> <td> <code title="event-message">message</code>
     <tr><td><dfn id="handler-websocket-onclose" title="handler-WebSocket-onclose"><code>onclose</code></dfn> <td> <code title="event-close">close</code>
   </table><h2 id="feedback-from-the-protocol"><span class="secno">5 </span>Feedback from the protocol</h2><p>When the <i>Web Socket connection is established</i>, the user
-  agent must run the following steps:<ol><li>
+  agent must <span>queue a task</span> to run the following steps:<ol><li>
 
     <p>Change the <code title="dom-WebSocket-readyState"><a href="#dom-websocket-readystate">readyState</a></code> attribute's value
     to <code title="dom-WebSocket-OPEN"><a href="#dom-websocket-open">OPEN</a></code> (1).</p>
@@ -451,9 +450,8 @@
 
    <li>
 
-    <p><span>Queue a task</span> to <span>fire a simple event</span>
-    named <code title="event-open">open</code> at the
-    <code><a href="#websocket">WebSocket</a></code> object.</p>
+    <p><span>Fire a simple event</span> named <code title="event-open">open</code> at the <code><a href="#websocket">WebSocket</a></code>
+    object.</p>
 
    </li>
 
@@ -461,11 +459,10 @@
   the <code>MessageEvent</code> interface, with the event name <code title="event-message">message</code>, which does not bubble, is not
   cancelable, has no default action, and whose <code title="dom-MessageEvent-data">data</code> attribute is set to <var title="">data</var>, and <span>queue a task</span> to dispatch it at
   the <code><a href="#websocket">WebSocket</a></code> object.<hr><p id="closeWebSocket">When the <i>Web Socket connection is
-  closed</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 <span>queue a task</span> to <span>fire
-  a simple event</span> named <code title="event-close">close</code> at the
-  <code><a href="#websocket">WebSocket</a></code> object.<hr><p>The <span>task source</span> for all <span title="concept-task">tasks</span> <span title="queue a
+  closed</i>, must <span>queue a task</span> 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
+  <span>fire a simple event</span> named <code title="event-close">close</code> at the <code><a href="#websocket">WebSocket</a></code>
+  object.<hr><p>The <span>task source</span> for all <span title="concept-task">tasks</span> <span title="queue a
   task">queued</span> in this section is the <dfn id="web-socket-task-source">Web Socket task
   source</dfn>.<h3 id="garbage-collection"><span class="secno">5.1 </span>Garbage collection</h3><p>A <code><a href="#websocket">WebSocket</a></code> object with an open connection must not
   be garbage collected if there are any event listeners registered for
Received on Wednesday, 9 December 2009 18:06:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 December 2009 18:07:01 GMT