[html5] r8836 - [e] (0) Switch to using USVString where that makes the prose simpler. (WebSocket [...]
whatwg at whatwg.org
whatwg at whatwg.org
Fri Oct 10 17:58:22 PDT 2014
Author: ianh
Date: 2014-10-10 17:58:18 -0700 (Fri, 10 Oct 2014)
New Revision: 8836
Modified:
complete.html
index
source
Log:
[e] (0) Switch to using USVString where that makes the prose simpler. (WebSocket, primarily)
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=26967
Affected topics: DOM APIs
Modified: complete.html
===================================================================
--- complete.html 2014-10-10 23:49:55 UTC (rev 8835)
+++ complete.html 2014-10-11 00:58:18 UTC (rev 8836)
@@ -2350,7 +2350,6 @@
<li><dfn id=platform-array-objects>Platform array objects</dfn>
<li><dfn id=dfn-read-only-array>Read only</dfn> (when applied to arrays)
<li><dfn id=dfn-callback-this-value>Callback this value</dfn>
- <li><dfn id=convert-a-domstring-to-a-sequence-of-unicode-characters>Convert a <code>DOMString</code> to a sequence of Unicode characters</dfn>
<li><dfn id=concept-idl-convert><a href=http://heycam.github.io/webidl/#es-type-mapping>Converting</a></dfn> between WebIDL types and JS types
</ul>
@@ -2362,6 +2361,7 @@
<li><dfn id=idl-boolean-wrapper><code>Boolean</code></dfn>
<li><dfn id=idl-date><code>Date</code></dfn>
<li><dfn id=idl-domstring><code>DOMString</code></dfn>
+ <li><dfn id=idl-usvstring><code>USVString</code></dfn>
<li><dfn id=idl-double><code>double</code></dfn>
<li><dfn id=idl-error><code>Error</code></dfn>
<li><dfn id=idl-function><code>Function</code></dfn>
@@ -67082,12 +67082,12 @@
attribute <a href=#eventhandler id=the-websocket-interface:eventhandler-3>EventHandler</a> <a href=#handler-websocket-onclose id=the-websocket-interface:handler-websocket-onclose>onclose</a>;
readonly attribute DOMString <a href=#dom-websocket-extensions id=the-websocket-interface:dom-websocket-extensions>extensions</a>;
readonly attribute DOMString <a href=#dom-websocket-protocol id=the-websocket-interface:dom-websocket-protocol>protocol</a>;
- void <a href=#dom-websocket-close id=the-websocket-interface:dom-websocket-close>close</a>([Clamp] optional unsigned short code, optional DOMString reason);
+ void <a href=#dom-websocket-close id=the-websocket-interface:dom-websocket-close>close</a>([Clamp] optional unsigned short code, optional <a href=#idl-usvstring id=the-websocket-interface:idl-usvstring>USVString</a> reason);
// messaging
attribute <a href=#eventhandler id=the-websocket-interface:eventhandler-4>EventHandler</a> <a href=#handler-websocket-onmessage id=the-websocket-interface:handler-websocket-onmessage>onmessage</a>;
attribute <a href=#binarytype id=the-websocket-interface:binarytype>BinaryType</a> <a href=#dom-websocket-binarytype id=the-websocket-interface:dom-websocket-binarytype>binaryType</a>;
- void <a href=#dom-websocket-send id=the-websocket-interface:dom-websocket-send>send</a>(DOMString data);
+ void <a href=#dom-websocket-send id=the-websocket-interface:dom-websocket-send>send</a>(<a href=#idl-usvstring id=the-websocket-interface:idl-usvstring-2>USVString</a> data);
void <a href=#dom-websocket-send id=the-websocket-interface:dom-websocket-send-2>send</a>(<a href=#blob id=the-websocket-interface:blob>Blob</a> data);
void <a href=#dom-websocket-send id=the-websocket-interface:dom-websocket-send-3>send</a>(<a href=#arraybuffer id=the-websocket-interface:arraybuffer>ArrayBuffer</a> data);
void <a href=#dom-websocket-send id=the-websocket-interface:dom-websocket-send-4>send</a>(<a href=#arraybufferview id=the-websocket-interface:arraybufferview>ArrayBufferView</a> data);
@@ -67210,8 +67210,7 @@
<p>If the method's second argument is present, then run these substeps:</p>
- <ol><li><p>Let <var>raw reason</var> be the method's second argument.<li><p>Let <var>Unicode reason</var> be the result of <a href=#convert-a-domstring-to-a-sequence-of-unicode-characters id=the-websocket-interface:convert-a-domstring-to-a-sequence-of-unicode-characters>converting <var>raw reason</var> to a sequence of
- Unicode characters</a>.<li><p>Let <var>reason</var> be the result of encoding <var>Unicode
+ <ol><li><p>Let <var>raw reason</var> be the method's second argument.<li><p>Let <var>reason</var> be the result of encoding <var>raw
reason</var> as UTF-8.<li><p>If <var>reason</var> is longer than 123 bytes, then throw a
<code id=the-websocket-interface:syntaxerror-3><a href=#syntaxerror>SyntaxError</a></code> exception and abort these steps. <a href=#refsENCODING>[ENCODING]</a></ol>
@@ -67329,10 +67328,9 @@
<dl><dt>If the argument is a string<dd>
- <p>Let <var>data</var> be the result of <a href=#convert-a-domstring-to-a-sequence-of-unicode-characters id=the-websocket-interface:convert-a-domstring-to-a-sequence-of-unicode-characters-2>converting the <var>data</var> argument to a sequence of Unicode
- characters</a>. If <i id=the-websocket-interface:concept-websocket-established-4><a href=#concept-websocket-established>the WebSocket connection is
+ <p>If <i id=the-websocket-interface:concept-websocket-established-4><a href=#concept-websocket-established>the WebSocket connection is
established</a></i> and <i id=the-websocket-interface:concept-websocket-closing-handshake-3><a href=#concept-websocket-closing-handshake>the WebSocket closing
- handshake has not yet started</a></i>, then the user agent must <i id=the-websocket-interface:concept-websocket-send><a href=#concept-websocket-send>send a WebSocket Message</a></i> comprised of <var>data</var> using
+ handshake has not yet started</a></i>, then the user agent must <i id=the-websocket-interface:concept-websocket-send><a href=#concept-websocket-send>send a WebSocket Message</a></i> comprised of the <var>data</var> argument using
a text frame opcode; 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=#concept-websocket-close-fail id=the-websocket-interface:concept-websocket-close-fail>flag the
WebSocket as full</a> and then <i id=the-websocket-interface:concept-websocket-close-5><a href=#concept-websocket-close>close the WebSocket
Modified: index
===================================================================
--- index 2014-10-10 23:49:55 UTC (rev 8835)
+++ index 2014-10-11 00:58:18 UTC (rev 8836)
@@ -2350,7 +2350,6 @@
<li><dfn id=platform-array-objects>Platform array objects</dfn>
<li><dfn id=dfn-read-only-array>Read only</dfn> (when applied to arrays)
<li><dfn id=dfn-callback-this-value>Callback this value</dfn>
- <li><dfn id=convert-a-domstring-to-a-sequence-of-unicode-characters>Convert a <code>DOMString</code> to a sequence of Unicode characters</dfn>
<li><dfn id=concept-idl-convert><a href=http://heycam.github.io/webidl/#es-type-mapping>Converting</a></dfn> between WebIDL types and JS types
</ul>
@@ -2362,6 +2361,7 @@
<li><dfn id=idl-boolean-wrapper><code>Boolean</code></dfn>
<li><dfn id=idl-date><code>Date</code></dfn>
<li><dfn id=idl-domstring><code>DOMString</code></dfn>
+ <li><dfn id=idl-usvstring><code>USVString</code></dfn>
<li><dfn id=idl-double><code>double</code></dfn>
<li><dfn id=idl-error><code>Error</code></dfn>
<li><dfn id=idl-function><code>Function</code></dfn>
@@ -67082,12 +67082,12 @@
attribute <a href=#eventhandler id=the-websocket-interface:eventhandler-3>EventHandler</a> <a href=#handler-websocket-onclose id=the-websocket-interface:handler-websocket-onclose>onclose</a>;
readonly attribute DOMString <a href=#dom-websocket-extensions id=the-websocket-interface:dom-websocket-extensions>extensions</a>;
readonly attribute DOMString <a href=#dom-websocket-protocol id=the-websocket-interface:dom-websocket-protocol>protocol</a>;
- void <a href=#dom-websocket-close id=the-websocket-interface:dom-websocket-close>close</a>([Clamp] optional unsigned short code, optional DOMString reason);
+ void <a href=#dom-websocket-close id=the-websocket-interface:dom-websocket-close>close</a>([Clamp] optional unsigned short code, optional <a href=#idl-usvstring id=the-websocket-interface:idl-usvstring>USVString</a> reason);
// messaging
attribute <a href=#eventhandler id=the-websocket-interface:eventhandler-4>EventHandler</a> <a href=#handler-websocket-onmessage id=the-websocket-interface:handler-websocket-onmessage>onmessage</a>;
attribute <a href=#binarytype id=the-websocket-interface:binarytype>BinaryType</a> <a href=#dom-websocket-binarytype id=the-websocket-interface:dom-websocket-binarytype>binaryType</a>;
- void <a href=#dom-websocket-send id=the-websocket-interface:dom-websocket-send>send</a>(DOMString data);
+ void <a href=#dom-websocket-send id=the-websocket-interface:dom-websocket-send>send</a>(<a href=#idl-usvstring id=the-websocket-interface:idl-usvstring-2>USVString</a> data);
void <a href=#dom-websocket-send id=the-websocket-interface:dom-websocket-send-2>send</a>(<a href=#blob id=the-websocket-interface:blob>Blob</a> data);
void <a href=#dom-websocket-send id=the-websocket-interface:dom-websocket-send-3>send</a>(<a href=#arraybuffer id=the-websocket-interface:arraybuffer>ArrayBuffer</a> data);
void <a href=#dom-websocket-send id=the-websocket-interface:dom-websocket-send-4>send</a>(<a href=#arraybufferview id=the-websocket-interface:arraybufferview>ArrayBufferView</a> data);
@@ -67210,8 +67210,7 @@
<p>If the method's second argument is present, then run these substeps:</p>
- <ol><li><p>Let <var>raw reason</var> be the method's second argument.<li><p>Let <var>Unicode reason</var> be the result of <a href=#convert-a-domstring-to-a-sequence-of-unicode-characters id=the-websocket-interface:convert-a-domstring-to-a-sequence-of-unicode-characters>converting <var>raw reason</var> to a sequence of
- Unicode characters</a>.<li><p>Let <var>reason</var> be the result of encoding <var>Unicode
+ <ol><li><p>Let <var>raw reason</var> be the method's second argument.<li><p>Let <var>reason</var> be the result of encoding <var>raw
reason</var> as UTF-8.<li><p>If <var>reason</var> is longer than 123 bytes, then throw a
<code id=the-websocket-interface:syntaxerror-3><a href=#syntaxerror>SyntaxError</a></code> exception and abort these steps. <a href=#refsENCODING>[ENCODING]</a></ol>
@@ -67329,10 +67328,9 @@
<dl><dt>If the argument is a string<dd>
- <p>Let <var>data</var> be the result of <a href=#convert-a-domstring-to-a-sequence-of-unicode-characters id=the-websocket-interface:convert-a-domstring-to-a-sequence-of-unicode-characters-2>converting the <var>data</var> argument to a sequence of Unicode
- characters</a>. If <i id=the-websocket-interface:concept-websocket-established-4><a href=#concept-websocket-established>the WebSocket connection is
+ <p>If <i id=the-websocket-interface:concept-websocket-established-4><a href=#concept-websocket-established>the WebSocket connection is
established</a></i> and <i id=the-websocket-interface:concept-websocket-closing-handshake-3><a href=#concept-websocket-closing-handshake>the WebSocket closing
- handshake has not yet started</a></i>, then the user agent must <i id=the-websocket-interface:concept-websocket-send><a href=#concept-websocket-send>send a WebSocket Message</a></i> comprised of <var>data</var> using
+ handshake has not yet started</a></i>, then the user agent must <i id=the-websocket-interface:concept-websocket-send><a href=#concept-websocket-send>send a WebSocket Message</a></i> comprised of the <var>data</var> argument using
a text frame opcode; 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=#concept-websocket-close-fail id=the-websocket-interface:concept-websocket-close-fail>flag the
WebSocket as full</a> and then <i id=the-websocket-interface:concept-websocket-close-5><a href=#concept-websocket-close>close the WebSocket
Modified: source
===================================================================
--- source 2014-10-10 23:49:55 UTC (rev 8835)
+++ source 2014-10-11 00:58:18 UTC (rev 8836)
@@ -2840,7 +2840,6 @@
<li><dfn>Platform array objects</dfn>
<li><dfn data-x="dfn-read-only-array">Read only</dfn> (when applied to arrays)
<li><dfn data-x="dfn-callback-this-value">Callback this value</dfn>
- <li><dfn>Convert a <code>DOMString</code> to a sequence of Unicode characters</dfn>
<li><dfn data-x="concept-idl-convert" data-x-href="http://heycam.github.io/webidl/#es-type-mapping">Converting</dfn> between WebIDL types and JS types
</ul>
@@ -2854,6 +2853,7 @@
<li><dfn><code data-x="idl-boolean-wrapper">Boolean</code></dfn>
<li><dfn><code data-x="idl-Date">Date</code></dfn>
<li><dfn><code data-x="idl-DOMString">DOMString</code></dfn>
+ <li><dfn><code data-x="idl-USVString">USVString</code></dfn>
<li><dfn><code data-x="idl-double">double</code></dfn>
<li><dfn><code data-x="idl-Error">Error</code></dfn>
<li><dfn><code data-x="idl-Function">Function</code></dfn>
@@ -90927,12 +90927,12 @@
attribute <span>EventHandler</span> <span data-x="handler-WebSocket-onclose">onclose</span>;
readonly attribute DOMString <span data-x="dom-WebSocket-extensions">extensions</span>;
readonly attribute DOMString <span data-x="dom-WebSocket-protocol">protocol</span>;
- void <span data-x="dom-WebSocket-close">close</span>([Clamp] optional unsigned short code, optional DOMString reason);
+ void <span data-x="dom-WebSocket-close">close</span>([Clamp] optional unsigned short code, optional <span data-x="idl-USVString">USVString</span> reason);
// messaging
attribute <span>EventHandler</span> <span data-x="handler-WebSocket-onmessage">onmessage</span>;
attribute <span>BinaryType</span> <span data-x="dom-WebSocket-binaryType">binaryType</span>;
- void <span data-x="dom-WebSocket-send">send</span>(DOMString data);
+ void <span data-x="dom-WebSocket-send">send</span>(<span data-x="idl-USVString">USVString</span> data);
void <span data-x="dom-WebSocket-send">send</span>(<span>Blob</span> data);
void <span data-x="dom-WebSocket-send">send</span>(<span>ArrayBuffer</span> data);
void <span data-x="dom-WebSocket-send">send</span>(<span>ArrayBufferView</span> data);
@@ -91105,11 +91105,7 @@
<li><p>Let <var>raw reason</var> be the method's second argument.</p></li>
- <li><p>Let <var>Unicode reason</var> be the result of <span data-x="convert a DOMString
- to a sequence of Unicode characters">converting <var>raw reason</var> to a sequence of
- Unicode characters</span>.</p></li>
-
- <li><p>Let <var>reason</var> be the result of encoding <var>Unicode
+ <li><p>Let <var>reason</var> be the result of encoding <var>raw
reason</var> as UTF-8.</p></li>
<li><p>If <var>reason</var> is longer than 123 bytes, then throw a
@@ -91276,12 +91272,10 @@
<dd>
- <p>Let <var>data</var> be the result of <span data-x="convert a DOMString to a sequence of
- Unicode characters">converting the <var>data</var> argument to a sequence of Unicode
- characters</span>. If <i data-x="concept-websocket-established">the WebSocket connection is
+ <p>If <i data-x="concept-websocket-established">the WebSocket connection is
established</i> and <i data-x="concept-websocket-closing-handshake">the WebSocket closing
handshake has not yet started</i>, then the user agent must <i
- data-x="concept-websocket-send">send a WebSocket Message</i> comprised of <var>data</var> using
+ data-x="concept-websocket-send">send a WebSocket Message</i> comprised of the <var>data</var> argument using
a text frame opcode; 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 data-x="concept-websocket-close-fail">flag the
WebSocket as full</span> and then <i data-x="concept-websocket-close">close the WebSocket
More information about the Commit-Watchers
mailing list