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

Unified Diff: sdk/lib/html/dartium/html_dartium.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:
Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/html/form_data_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index b986ac284f3763dd3a753137341559985a5ff972..050dbb229d792fa76fd8947621978f530392f015 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -11446,7 +11446,11 @@ class FormData extends NativeFieldWrapperClass1 {
@DomName('FormData.append')
@DocsEditable()
- void append(String name, value, [String filename]) native "FormData_append_Callback";
+ void append(String name, String value) native "FormData_append_Callback";
+
+ @DomName('FormData.appendBlob')
+ @DocsEditable()
+ void appendBlob(String name, Blob value, [String filename]) native "FormData_appendBlob_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24790,10 +24794,34 @@ class WebSocket extends EventTarget {
@DocsEditable()
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "WebSocket_removeEventListener_Callback";
+ /**
+ * 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 "WebSocket_send_Callback";
+ @DomName('WebSocket.sendBlob')
+ @DocsEditable()
+ void sendBlob(Blob data) native "WebSocket_sendBlob_Callback";
+
+ @DomName('WebSocket.sendByteBuffer')
+ @DocsEditable()
+ void sendByteBuffer(ByteBuffer data) native "WebSocket_sendByteBuffer_Callback";
+
+ @DomName('WebSocket.sendString')
+ @DocsEditable()
+ void sendString(String data) native "WebSocket_sendString_Callback";
+
+ @DomName('WebSocket.sendTypedData')
+ @DocsEditable()
+ @Experimental() // untriaged
+ void sendTypedData(TypedData data) native "WebSocket_sendTypedData_Callback";
+
@DomName('WebSocket.onclose')
@DocsEditable()
Stream<CloseEvent> get onClose => closeEvent.forTarget(this);
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/html/form_data_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698