[html5] r7261 - [e] (0) Use an enum instead of a DOMString for binaryType. Fixing https://www.w3 [...]
whatwg at whatwg.org
whatwg at whatwg.org
Thu Aug 23 15:15:17 PDT 2012
Author: ianh
Date: 2012-08-23 15:15:16 -0700 (Thu, 23 Aug 2012)
New Revision: 7261
Modified:
source
Log:
[e] (0) Use an enum instead of a DOMString for binaryType.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=18416
Affected topics: WebSocket API
Modified: source
===================================================================
--- source 2012-08-23 22:11:39 UTC (rev 7260)
+++ source 2012-08-23 22:15:16 UTC (rev 7261)
@@ -98152,7 +98152,8 @@
<h4>The <code>WebSocket</code> interface</h4>
- <pre class="idl">[<span title="dom-WebSocket">Constructor</span>(DOMString url, optional (DOMString or DOMString[]) protocols)]
+ <pre class="idl">enum <dfn>BinaryType</dfn> { "<span title="dom-BinaryType-blob">blob</span>", "<span>dom-BinaryType-arraybuffer">arraybuffer</span>" };
+[<span title="dom-WebSocket">Constructor</span>(DOMString url, optional (DOMString or DOMString[]) protocols)]
interface <dfn>WebSocket</dfn> : <span>EventTarget</span> {
readonly attribute DOMString <span title="dom-WebSocket-url">url</span>;
@@ -98174,7 +98175,7 @@
// messaging
attribute <span>EventHandler</span> <span title="handler-WebSocket-onmessage">onmessage</span>;
- attribute DOMString <span title="dom-WebSocket-binaryType">binaryType</span>;
+ attribute <span>BinaryType</span> <span title="dom-WebSocket-binaryType">binaryType</span>;
void <span title="dom-WebSocket-send">send</span>(DOMString data);
void <span title="dom-WebSocket-send">send</span>(<span>Blob</span> data);
void <span title="dom-WebSocket-send">send</span>(<span>ArrayBuffer</span> data);
@@ -98547,11 +98548,8 @@
<p>When a <code>WebSocket</code> object is created, its <dfn
title="dom-WebSocket-binaryType"><code>binaryType</code></dfn> IDL
attribute must be set to the string "<code title="">blob</code>". On
- getting, it must return the last value it was set to. On setting, if
- 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>SyntaxError</code> exception.</p>
+ getting, it must return the last value it was set to. On setting,
+ the user agent must set the IDL attribute to the new value.</p>
<p class="note">This attribute allows authors to control how binary
data is exposed to scripts. By setting the attribute to "<code
More information about the Commit-Watchers
mailing list