Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1546)

Unified Diff: Source/modules/websockets/WebSocket.idl

Issue 954933003: Sync the WebSocket interface with the spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/websockets/WebSocket.idl
diff --git a/Source/modules/websockets/WebSocket.idl b/Source/modules/websockets/WebSocket.idl
index c2a343cd22eff344cdf80919caf67e452b138cb3..8b22abbc694eb1b627962feb2d03030391fad257 100644
--- a/Source/modules/websockets/WebSocket.idl
+++ b/Source/modules/websockets/WebSocket.idl
@@ -30,16 +30,14 @@
*/
// http://dev.w3.org/html5/websockets/#websocket
philipj_slow 2015/02/26 03:02:53 I'm pretty sure this copy of the spec is abandoned
jsbell 2015/02/26 19:56:54 Done.
-// http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#websocket
+// https://html.spec.whatwg.org/multipage/comms.html#websocket
philipj_slow 2015/02/26 03:02:53 Can you link to https://html.spec.whatwg.org/multi
jsbell 2015/02/26 19:56:53 Done.
// FIXME: use BinaryType in binaryType
jsbell 2015/02/25 18:51:11 See https://codereview.chromium.org/871013007/ by
enum BinaryType { "blob", "arraybuffer" };
[
ActiveDOMObject,
- // FIXME: should be optional union type http://crbug.com/240176
- Constructor(DOMString url, optional DOMString protocol),
- Constructor(DOMString url, sequence<DOMString> protocols),
+ Constructor(DOMString url, optional (DOMString or sequence<DOMString>) protocols),
jsbell 2015/02/25 18:51:11 Spec has (DOMString or DOMString[]) but it's uncle
jsbell 2015/02/25 23:18:55 I filed this against the HTML spec: https://www.w
philipj_slow 2015/02/26 03:02:53 Can you add a FIXME here linking to that spec bug,
jsbell 2015/02/26 19:56:54 Done.
ConstructorCallWith=ExecutionContext,
Exposed=(Window,Worker),
RaisesException=Constructor,
@@ -58,17 +56,17 @@ enum BinaryType { "blob", "arraybuffer" };
readonly attribute unsigned long bufferedAmount;
// networking
- attribute EventHandler onopen;
- attribute EventHandler onerror;
- attribute EventHandler onclose;
+ attribute EventHandler onopen;
+ attribute EventHandler onerror;
+ attribute EventHandler onclose;
[TreatReturnedNullStringAs=Undefined] readonly attribute DOMString extensions;
philipj_slow 2015/02/26 03:02:53 Add FIXMEs for these two [TreatReturnedNullStringA
jsbell 2015/02/26 19:56:54 Done. I traced the code back through from Chromiu
[TreatReturnedNullStringAs=Undefined] readonly attribute DOMString protocol;
- [RaisesException] void close([Clamp] optional unsigned short code, optional DOMString reason);
+ [RaisesException] void close([Clamp] optional unsigned short code, optional USVString reason);
// messaging
- attribute EventHandler onmessage;
- attribute DOMString binaryType;
- [RaisesException] void send(DOMString data);
+ attribute EventHandler onmessage;
+ attribute DOMString binaryType;
+ [RaisesException] void send(USVString data);
[RaisesException] void send(Blob data);
philipj_slow 2015/02/26 03:02:53 Note that without [TypeChecking=Interface], some n
philipj_slow 2015/02/26 03:05:59 Hmm, I'm actually not sure what happens when there
jsbell 2015/02/26 05:45:18 I'll take a look at the generated code and report
jsbell 2015/02/26 19:56:54 The generated code does change, but there's no beh
philipj_slow 2015/02/27 04:23:09 Oh, overloading also changes things a bit. [TypeCh
[RaisesException] void send(ArrayBuffer data);
[RaisesException] void send(ArrayBufferView data);

Powered by Google App Engine
This is Rietveld 408576698