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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 18850007: Add back appendBlob and send variants in WebSocket. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index d2e78dd3d6f8bd20a68edc6c5ec2b0a02a8b224c..65781a02d04da5d86fb9fc54f15fde32d7a286e9 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -11087,7 +11087,12 @@ class FormData extends Interceptor native "FormData" {
@DomName('FormData.append')
@DocsEditable()
- void append(String name, value, [String filename]) native;
+ void append(String name, String value) native;
+
+ @JSName('append')
+ @DomName('FormData.append')
+ @DocsEditable()
+ void appendBlob(String name, Blob value, [String filename]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -23163,10 +23168,65 @@ class WebSocket extends EventTarget native "WebSocket" {
@DocsEditable()
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ /**
+ * Transmit data to the server over this connection.
+ *
+ * This method accepts data of type [Blob], [ByteBuffer], [String], or
+ * [TypedData]. Named variants [sendBlob], [sendByteBuffer], [sendString],
+ * or [sendTypedData], in constrast, only accept data of the specified type.
+ */
@DomName('WebSocket.send')
@DocsEditable()
void send(data) native;
+ @JSName('send')
+ /**
+ * Transmit data to the server over this connection.
+ *
+ * This method accepts data of type [Blob], [ByteBuffer], [String], or
+ * [TypedData]. Named variants [sendBlob], [sendByteBuffer], [sendString],
+ * or [sendTypedData], in constrast, only accept data of the specified type.
+ */
+ @DomName('WebSocket.send')
+ @DocsEditable()
+ void sendBlob(Blob data) native;
+
+ @JSName('send')
+ /**
+ * Transmit data to the server over this connection.
+ *
+ * This method accepts data of type [Blob], [ByteBuffer], [String], or
+ * [TypedData]. Named variants [sendBlob], [sendByteBuffer], [sendString],
+ * or [sendTypedData], in constrast, only accept data of the specified type.
+ */
+ @DomName('WebSocket.send')
+ @DocsEditable()
+ void sendByteBuffer(ByteBuffer data) native;
+
+ @JSName('send')
+ /**
+ * Transmit data to the server over this connection.
+ *
+ * This method accepts data of type [Blob], [ByteBuffer], [String], or
+ * [TypedData]. Named variants [sendBlob], [sendByteBuffer], [sendString],
+ * or [sendTypedData], in constrast, only accept data of the specified type.
+ */
+ @DomName('WebSocket.send')
+ @DocsEditable()
+ void sendString(String data) native;
+
+ @JSName('send')
+ /**
+ * Transmit data to the server over this connection.
+ *
+ * This method accepts data of type [Blob], [ByteBuffer], [String], or
+ * [TypedData]. Named variants [sendBlob], [sendByteBuffer], [sendString],
+ * or [sendTypedData], in constrast, only accept data of the specified type.
+ */
+ @DomName('WebSocket.send')
+ @DocsEditable()
+ void sendTypedData(TypedData data) native;
+
@DomName('WebSocket.onclose')
@DocsEditable()
Stream<CloseEvent> get onClose => closeEvent.forTarget(this);
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698