websocket; hixie: Add WebSocket.onmessageerror to report unexpected frames. (whatwg r4816)

websocket; hixie: Add WebSocket.onmessageerror to report unexpected
frames. (whatwg r4816)

http://dev.w3.org/cvsweb/html5/websockets/Overview.html?r1=1.158&r2=1.159&f=h
http://html5.org/tools/web-apps-tracker?from=4815&to=4816

===================================================================
RCS file: /sources/public/html5/websockets/Overview.html,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- Overview.html 2 Mar 2010 09:01:59 -0000 1.158
+++ Overview.html 2 Mar 2010 10:42:20 -0000 1.159
@@ -359,6 +359,7 @@
   // networking
            attribute <span>Function</span> <a href="#handler-websocket-onopen" title="handler-WebSocket-onopen">onopen</a>;
            attribute <span>Function</span> <a href="#handler-websocket-onmessage" title="handler-WebSocket-onmessage">onmessage</a>;
+           attribute <span>Function</span> <a href="#handler-websocket-onmessageerror" title="handler-WebSocket-onmessageerror">onmessageerror</a>;
            attribute <span>Function</span> <a href="#handler-websocket-onclose" title="handler-WebSocket-onclose">onclose</a>;
   boolean <a href="#dom-websocket-send" title="dom-WebSocket-send">send</a>(in DOMString data);
   void <a href="#dom-websocket-close" title="dom-WebSocket-close">close</a>();
@@ -486,6 +487,7 @@
   <code><a href="#websocket">WebSocket</a></code> interface:<table><thead><tr><th><span title="event handlers">Event handler</span> <th><span>Event handler event type</span>
    <tbody><tr><td><dfn id="handler-websocket-onopen" title="handler-WebSocket-onopen"><code>onopen</code></dfn> <td> <code title="event-open">open</code>
     <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-onmessageerror" title="handler-WebSocket-onmessageerror"><code>onmessageerror</code></dfn> <td> <code title="event-messageerror">messageerror</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>WebSocket connection is established</i>, the user
   agent must <span>queue a task</span> to first change the <code title="dom-WebSocket-readyState"><a href="#dom-websocket-readystate">readyState</a></code> attribute's value
@@ -497,6 +499,11 @@
   if the <code title="dom-WebSocket-readyState"><a href="#dom-websocket-readystate">readyState</a></code>
   attribute's value is <code title="dom-WebSocket-OPEN"><a href="#dom-websocket-open">OPEN</a></code>
   (1), and if so, dispatch the event at the <code><a href="#websocket">WebSocket</a></code>
+  object.<p>When <i>a WebSocket error has been detected</i>, the user agent
+  must <span>queue a task</span> to set to <var title="">data</var>,
+  and <span>queue a task</span> to check to see if the <code title="dom-WebSocket-readyState"><a href="#dom-websocket-readystate">readyState</a></code> attribute's value
+  is <code title="dom-WebSocket-OPEN"><a href="#dom-websocket-open">OPEN</a></code> (1), and if so,
+  <span>fire a simple event</span> named <code title="event-messageerror">messageerror</code> at the <code><a href="#websocket">WebSocket</a></code>
   object.<p id="closeWebSocket">When the <i>WebSocket connection is
   closed</i>, the user agent must <span>queue a task</span> to first
   change the <code title="dom-WebSocket-readyState"><a href="#dom-websocket-readystate">readyState</a></code>

Received on Tuesday, 2 March 2010 10:42:58 UTC