- From: poot <cvsmail@w3.org>
- Date: Thu, 29 Sep 2011 20:25:14 -0400
- To: public-html-diffs@w3.org
websocket; hixie: Exceptions DOM Core/WebIDL fix. (whatwg r6602) http://dev.w3.org/cvsweb/html5/websockets/Overview.html?r1=1.243&r2=1.244&f=h http://html5.org/tools/web-apps-tracker?from=6601&to=6602 =================================================================== RCS file: /sources/public/html5/websockets/Overview.html,v retrieving revision 1.243 retrieving revision 1.244 diff -u -d -r1.243 -r1.244 --- Overview.html 29 Sep 2011 21:02:08 -0000 1.243 +++ Overview.html 30 Sep 2011 00:24:58 -0000 1.244 @@ -214,7 +214,7 @@ <h1>The WebSocket API</h1> - <h2 class="no-num no-toc" id="editor-s-draft-29-september-2011">Editor's Draft 29 September 2011</h2> + <h2 class="no-num no-toc" id="editor-s-draft-30-september-2011">Editor's Draft 30 September 2011</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> @@ -318,7 +318,7 @@ </dl><p>The W3C <a href="http://www.w3.org/2008/webapps/">Web Applications Working Group</a> is the W3C working group responsible for this specification's progress along the W3C Recommendation track. - This specification is the 29 September 2011 Editor's Draft. + This specification is the 30 September 2011 Editor's Draft. <p>This specification is being developed in conjunction with an Internet Draft for a wire protocol, the WebSocket Protocol, available from the following location:<ul><li>WebSocket Protocol Internet-Draft: <a href="http://www.whatwg.org/specs/web-socket-protocol/">http://www.whatwg.org/specs/web-socket-protocol/</a></li> @@ -451,18 +451,18 @@ must run these steps:<ol><li><p><i>Parse a WebSocket URL's components</i> from the <var title="">url</var> argument, to obtain <var title="">host</var>, <var title="">port</var>, <var title="">resource name</var>, and <var title="">secure</var>. If this fails, throw a - <code>SYNTAX_ERR</code> exception and abort these steps. <a href="#refsWSP">[WSP]</a></li> + <code>SyntaxError</code> exception and abort these steps. <a href="#refsWSP">[WSP]</a></li> <li><p>If <var title="">secure</var> is false but the <span>origin</span> of the <span>entry script</span> has a scheme component that is itself a secure protocol, e.g. HTTPS, then throw - a <code>SECURITY_ERR</code> exception.</li> + a <code>SecurityError</code> exception.</li> <li> <p>If <var title="">port</var> is a port to which the user agent is configured to block access, then throw a - <code>SECURITY_ERR</code> exception. (User agents typically block + <code>SecurityError</code> exception. (User agents typically block access to well-known ports like SMTP.)</p> @@ -488,7 +488,7 @@ more than once or otherwise fail to match the requirements for elements that comprise the value of <code title="http-sec-websocket-protocol">Sec-WebSocket-Protocol</code> header fields as defined by the WebSocket protocol specification, - then throw a <code>SYNTAX_ERR</code> exception and abort these + then throw a <code>SyntaxError</code> exception and abort these steps. <a href="#refsWSP">[WSP]</a></li> <li><p>Let <var title="">origin</var> be the <span title="ASCII @@ -571,16 +571,16 @@ to perform subprotocol negotiation.<p>The <dfn id="dom-websocket-close" title="dom-WebSocket-close"><code>close()</code></dfn> method must run the following steps:<ol><li><p>If the method's first argument is present but is not an integer equal to 1000 or in the range 3000 to 4999, throw an - <code>INVALID_ACCESS_ERR</code> exception and abort these + <code>InvalidAccessError</code> exception and abort these steps.</li> <li><p>If the method's second argument has any unpaired surrogates, - then throw a <code>SYNTAX_ERR</code> exception and abort these + then throw a <code>SyntaxError</code> exception and abort these steps.</li> <li><p>If the method's second argument is present, then let <var title="">reason</var> be the result of encoding that argument as UTF-8. If <var title="">reason</var> is longer than 123 bytes, then - throw a <code>SYNTAX_ERR</code> exception and abort these steps. + throw a <code>SyntaxError</code> exception and abort these steps. <a href="#refsRFC3629">[RFC3629]</a></li> <li><p>Run the first matching steps from the following list:</p> @@ -696,7 +696,7 @@ the new value is either the string "<code title="">blob</code>" or the string "<code title="">arraybuffer</code>", then set the IDL attribute to this new value. Otherwise, throw a - <code>SYNTAX_ERR</code> exception.<p class="note">This attribute allows authors to control how binary + <code>SyntaxError</code> exception.<p class="note">This attribute allows authors to control how binary data is exposed to scripts. By setting the attribute to "<code title="">blob</code>", binary data is returned in <code>Blob</code> form; by setting it to "<code title="">arraybuffer</code>", it is returned in <code>ArrayBuffer</code> form. User agents can use this @@ -713,14 +713,14 @@ user agent as fired the event for it.<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 <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. Otherwise, the + throw an <code>InvalidStateError</code> exception. Otherwise, the user agent must run the appropriate set of steps from the following list:<dl><dt>If the argument is a string</dt> <dd> <p>If the <var title="">data</var> argument has any unpaired - surrogates, then raise a <code>SYNTAX_ERR</code> exception. If + surrogates, then throw a <code>SyntaxError</code> exception. If <i>the WebSocket connection is established</i>, and the string has no unpaired surrogates, and <i title="the WebSocket closing handshake is started">the WebSocket closing handshake has not yet @@ -730,7 +730,7 @@ need to be buffered but the buffer is full, the user agent must <i>close the WebSocket connection</i> <a href="#concept-websocket-close-fail" title="concept-websocket-close-fail">with prejudice</a>. Any invokation of this method with a string argument that does not - raise an exception must increase the <code title="dom-WebSocket-bufferedAmount"><a href="#dom-websocket-bufferedamount">bufferedAmount</a></code> + throw an exception must increase the <code title="dom-WebSocket-bufferedAmount"><a href="#dom-websocket-bufferedamount">bufferedAmount</a></code> attribute by the number of bytes needed to express the argument as UTF-8. <a href="#refsRFC3629">[RFC3629]</a> <a href="#refsWSP">[WSP]</a></p> @@ -750,7 +750,7 @@ prejudice</a>. The data to be sent is the raw data represented by the <code>Blob</code> object. Any invokation of this method with a <code>Blob</code> argument that - does not raise an exception must increase the <code title="dom-WebSocket-bufferedAmount"><a href="#dom-websocket-bufferedamount">bufferedAmount</a></code> + does not throw an exception must increase the <code title="dom-WebSocket-bufferedAmount"><a href="#dom-websocket-bufferedamount">bufferedAmount</a></code> attribute by the size of the <code>Blob</code> object's raw data, in bytes. <a href="#refsWSP">[WSP]</a> <a href="#refsFILEAPI">[FILEAPI]</a></p> @@ -769,7 +769,7 @@ connection</i> <a href="#concept-websocket-close-fail" title="concept-websocket-close-fail">with prejudice</a>. The data to be sent is the data stored in the buffer described by the <code>ArrayBuffer</code> object. Any invokation of this method with an - <code>ArrayBuffer</code> argument that does not raise an exception + <code>ArrayBuffer</code> argument that does not throw an exception must increase the <code title="dom-WebSocket-bufferedAmount"><a href="#dom-websocket-bufferedamount">bufferedAmount</a></code> attribute by the length of the <code>ArrayBuffer</code> in bytes. <a href="#refsWSP">[WSP]</a> <a href="#refsTYPEDARRAY">[TYPEDARRAY]</a></p>
Received on Friday, 30 September 2011 00:25:21 UTC