[html5] r5963 - [giow] (0) WebSockets: add reason and code to the event; also some minor editori [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Mar 24 16:59:37 PDT 2011


Author: ianh
Date: 2011-03-24 16:59:36 -0700 (Thu, 24 Mar 2011)
New Revision: 5963

Modified:
   complete.html
   index
   source
Log:
[giow] (0) WebSockets: add reason and code to the event; also some minor editorial things. More WebSockets changes coming.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=12102

Modified: complete.html
===================================================================
--- complete.html	2011-03-24 20:10:14 UTC (rev 5962)
+++ complete.html	2011-03-24 23:59:36 UTC (rev 5963)
@@ -239,7 +239,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1>Web Applications 1.0</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 21 March 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 24 March 2011</h2>
    </hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -73430,7 +73430,7 @@
 
   <pre class=idl>interface <dfn id=streamevent>StreamEvent</dfn> : <a href=#event>Event</a> {
   readonly attribute <a href=#stream>Stream</a> <a href=#dom-streamevent-stream title=dom-StreamEvent-stream>stream</a>;
-  void <a href=#dom-closeevent-initcloseevent title=dom-CloseEvent-initCloseEvent>initCloseEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in <a href=#stream>Stream</a> streamArg);
+  void <a href=#dom-streamevent-initstreamevent title=dom-StreamEvent-initStreamEvent>initStreamEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in <a href=#stream>Stream</a> streamArg);
 };</pre>
 
   <div class=impl>
@@ -76836,7 +76836,20 @@
   <p>When the <i>WebSocket connection is established</i>, the user
   agent must <a href=#queue-a-task>queue a task</a> to first 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); <span>apply the
-  cookies</span> that were collected in the <var title="">list of
+  cookies</span>
+<!--
+Once we have the cookies back:
+
+     <li><p>Act as if <span title="receives a
+     set-cookie-string">receiving a set-cookie-string</span> for
+     <span>the document's address</span>,
+     consisting of the value of the element's <code
+     title="attr-meta-content">content</code> attribute encoded as
+     UTF-8. <a href="#refsCOOKIES">[COOKIES]</a> <a
+     href="#refsRFC3629">[RFC3629]</a></p></li>
+
+-->
+  that were collected in the <var title="">list of
   cookies</var> when the <span title="WebSocket connection is
   established">connection was established</span>; change the <code title=dom-WebSocket-protocol><a href=#dom-websocket-protocol>protocol</a></code> attribute's value to
   the <span>selected WebSocket subprotocol</span>, if there is one;
@@ -76869,13 +76882,16 @@
   closed</i>, possibly <i title="">cleanly</i>, the user agent must
   create an event that uses the <code><a href=#closeevent>CloseEvent</a></code> interface,
   with the event name <code title=event-close>close</code>, which
-  does not bubble, is not cancelable, has no default action, and whose
+  does not bubble, is not cancelable, has no default action, whose
   <code title=dom-CloseEvent-wasClean><a href=#dom-closeevent-wasclean>wasClean</a></code> attribute is
   set to true if the connection closed <i title="">cleanly</i> and
-  false otherwise; and <a href=#queue-a-task>queue a task</a> to first 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> (3), and
-  then dispatch the event at the <code><a href=#websocket>WebSocket</a></code> object. <a href=#refsWSP>[WSP]</a></p>
+  false otherwise, whose <code title=dom-CloseEvent-code><a href=#dom-closeevent-code>code</a></code>
+  attribute is set to the <i>WebSocket connection close code</i>, and
+  whose <code title=dom-CloseEvent-reason><a href=#dom-closeevent-reason>reason</a></code> attribute is
+  set to the <i>WebSocket connection close reason</i>; and <a href=#queue-a-task>queue
+  a task</a> to first 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> (3), and then
+  dispatch the event at the <code><a href=#websocket>WebSocket</a></code> object. <a href=#refsWSP>[WSP]</a></p>
 
   <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=websocket-task-source>WebSocket task
@@ -76886,7 +76902,9 @@
 
   <pre class=idl>interface <dfn id=closeevent>CloseEvent</dfn> : <a href=#event>Event</a> {
   readonly attribute boolean <a href=#dom-closeevent-wasclean title=dom-CloseEvent-wasClean>wasClean</a>;
-  void <a href=#dom-closeevent-initcloseevent title=dom-CloseEvent-initCloseEvent>initCloseEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in boolean wasCleanArg);
+  readonly attribute unsigned long <span title=dom-WebSocket-code>code</span>;
+  readonly attribute DOMString <span title=dom-WebSocket-reason>reason</span>;
+  void <a href=#dom-closeevent-initcloseevent title=dom-CloseEvent-initCloseEvent>initCloseEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in boolean wasCleanArg, in unsigned long codeArg, in unsigned long reasonArg);
 };</pre>
 
   <p>The <dfn id=dom-closeevent-initcloseevent title=dom-CloseEvent-initCloseEvent><code>initCloseEvent()</code></dfn>
@@ -76897,8 +76915,16 @@
   attribute represents whether the connection closed cleanly or
   not.</p>
 
+  <p>The <dfn id=dom-closeevent-code title=dom-CloseEvent-code><code>code</code></dfn>
+  attribute represents the WebSocket connection close code provided by
+  the server.</p>
 
+  <p>The <dfn id=dom-closeevent-reason title=dom-CloseEvent-reason><code>reason</code></dfn>
+  attribute represents the WebSocket connection close reason provided
+  by the server.</p>
 
+
+
   <h5 id=garbage-collection-1><span class=secno>11.3.3.2 </span>Garbage collection</h5>
 
   <p>A <code><a href=#websocket>WebSocket</a></code> object whose <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's value

Modified: index
===================================================================
--- index	2011-03-24 20:10:14 UTC (rev 5962)
+++ index	2011-03-24 23:59:36 UTC (rev 5963)
@@ -73436,7 +73436,7 @@
 
   <pre class=idl>interface <dfn id=streamevent>StreamEvent</dfn> : <a href=#event>Event</a> {
   readonly attribute <a href=#stream>Stream</a> <a href=#dom-streamevent-stream title=dom-StreamEvent-stream>stream</a>;
-  void <span title=dom-CloseEvent-initCloseEvent>initCloseEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in <a href=#stream>Stream</a> streamArg);
+  void <a href=#dom-streamevent-initstreamevent title=dom-StreamEvent-initStreamEvent>initStreamEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in <a href=#stream>Stream</a> streamArg);
 };</pre>
 
   <div class=impl>

Modified: source
===================================================================
--- source	2011-03-24 20:10:14 UTC (rev 5962)
+++ source	2011-03-24 23:59:36 UTC (rev 5963)
@@ -83779,7 +83779,7 @@
 
   <pre class="idl">interface <dfn>StreamEvent</dfn> : <span>Event</span> {
   readonly attribute <span>Stream</span> <span title="dom-StreamEvent-stream">stream</span>;
-  void <span title="dom-CloseEvent-initCloseEvent">initCloseEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in <span>Stream</span> streamArg);
+  void <span title="dom-StreamEvent-initStreamEvent">initStreamEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in <span>Stream</span> streamArg);
 };</pre>
 
   <div class="impl">
@@ -86988,7 +86988,20 @@
   agent must <span>queue a task</span> to first change the <code
   title="dom-WebSocket-readyState">readyState</code> attribute's value
   to <code title="dom-WebSocket-OPEN">OPEN</code> (1); <span>apply the
-  cookies</span> that were collected in the <var title="">list of
+  cookies</span>
+<!--
+Once we have the cookies back:
+
+     <li><p>Act as if <span title="receives a
+     set-cookie-string">receiving a set-cookie-string</span> for
+     <span>the document's address</span>,
+     consisting of the value of the element's <code
+     title="attr-meta-content">content</code> attribute encoded as
+     UTF-8. <a href="#refsCOOKIES">[COOKIES]</a> <a
+     href="#refsRFC3629">[RFC3629]</a></p></li>
+
+-->
+  that were collected in the <var title="">list of
   cookies</var> when the <span title="WebSocket connection is
   established">connection was established</span>; change the <code
   title="dom-WebSocket-protocol">protocol</code> attribute's value to
@@ -87033,13 +87046,17 @@
   closed</i>, possibly <i title="">cleanly</i>, the user agent must
   create an event that uses the <code>CloseEvent</code> interface,
   with the event name <code title="event-close">close</code>, which
-  does not bubble, is not cancelable, has no default action, and whose
+  does not bubble, is not cancelable, has no default action, whose
   <code title="dom-CloseEvent-wasClean">wasClean</code> attribute is
   set to true if the connection closed <i title="">cleanly</i> and
-  false otherwise; and <span>queue a task</span> to first change the
-  <code title="dom-WebSocket-readyState">readyState</code> attribute's
-  value to <code title="dom-WebSocket-CLOSED">CLOSED</code> (3), and
-  then dispatch the event at the <code>WebSocket</code> object. <a
+  false otherwise, whose <code title="dom-CloseEvent-code">code</code>
+  attribute is set to the <i>WebSocket connection close code</i>, and
+  whose <code title="dom-CloseEvent-reason">reason</code> attribute is
+  set to the <i>WebSocket connection close reason</i>; and <span>queue
+  a task</span> to first change the <code
+  title="dom-WebSocket-readyState">readyState</code> attribute's value
+  to <code title="dom-WebSocket-CLOSED">CLOSED</code> (3), and then
+  dispatch the event at the <code>WebSocket</code> object. <a
   href="#refsWSP">[WSP]</a></p>
 
   <p>The <span>task source</span> for all <span
@@ -87052,7 +87069,9 @@
 
   <pre class="idl">interface <dfn>CloseEvent</dfn> : <span>Event</span> {
   readonly attribute boolean <span title="dom-CloseEvent-wasClean">wasClean</span>;
-  void <span title="dom-CloseEvent-initCloseEvent">initCloseEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in boolean wasCleanArg);
+  readonly attribute unsigned long <span title="dom-WebSocket-code">code</span>;
+  readonly attribute DOMString <span title="dom-WebSocket-reason">reason</span>;
+  void <span title="dom-CloseEvent-initCloseEvent">initCloseEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in boolean wasCleanArg, in unsigned long codeArg, in unsigned long reasonArg);
 };</pre>
 
   <p>The <dfn
@@ -87066,8 +87085,17 @@
   attribute represents whether the connection closed cleanly or
   not.</p>
 
+  <p>The <dfn title="dom-CloseEvent-code"><code>code</code></dfn>
+  attribute represents the WebSocket connection close code provided by
+  the server.</p>
 
+  <p>The <dfn
+  title="dom-CloseEvent-reason"><code>reason</code></dfn>
+  attribute represents the WebSocket connection close reason provided
+  by the server.</p>
 
+
+
   <h5>Garbage collection</h5>
 
   <p>A <code>WebSocket</code> object whose <code




More information about the Commit-Watchers mailing list