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

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

Issue 16494002: Expand overloaded methods and optional parameters in the html library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 8e307a41ff76ac3b206261f3a336c7ccebdf9c08..8969048d7340fb1c8d639a4624c6ad3d1e5f57d0 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -1177,7 +1177,12 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "CanvasRend
@DomName('CanvasRenderingContext2D.createPattern')
@DocsEditable
- CanvasPattern createPattern(canvas_OR_image, String repetitionType) native;
+ CanvasPattern createPattern(CanvasElement canvas, String repetitionType) native;
+
+ @JSName('createPattern')
+ @DomName('CanvasRenderingContext2D.createPattern')
+ @DocsEditable
+ CanvasPattern createPatternFromImage(ImageElement image, String repetitionType) native;
@DomName('CanvasRenderingContext2D.createRadialGradient')
@DocsEditable
@@ -1921,7 +1926,12 @@ class Css native "CSS" {
@DomName('CSS.supports')
@DocsEditable
- bool supports(String conditionText_OR_property, [String value]) native;
+ bool supports(String property, String value) native;
+
+ @JSName('supports')
+ @DomName('CSS.supports')
+ @DocsEditable
+ bool supportsCondition(String conditionText) 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
@@ -6141,6 +6151,16 @@ class DataTransferItemList native "DataTransferItemList" {
@DocsEditable
void add(data_OR_file, [String type]) native;
+ @JSName('add')
+ @DomName('DataTransferItemList.add')
+ @DocsEditable
+ void addData(String data, String type) native;
+
+ @JSName('add')
+ @DomName('DataTransferItemList.add')
+ @DocsEditable
+ void addFile(File file) native;
+
@DomName('DataTransferItemList.clear')
@DocsEditable
void clear() native;
@@ -6380,38 +6400,38 @@ class DirectoryEntry extends Entry native "DirectoryEntry" {
void __getDirectory(String path, {Map options, _EntryCallback successCallback, _ErrorCallback errorCallback}) {
if (errorCallback != null) {
var options_1 = convertDartToNative_Dictionary(options);
- ___getDirectory_1(path, options_1, successCallback, errorCallback);
+ __getDirectory_1(path, options_1, successCallback, errorCallback);
return;
}
if (successCallback != null) {
var options_2 = convertDartToNative_Dictionary(options);
- ___getDirectory_2(path, options_2, successCallback);
+ __getDirectory_2(path, options_2, successCallback);
return;
}
if (options != null) {
var options_3 = convertDartToNative_Dictionary(options);
- ___getDirectory_3(path, options_3);
+ __getDirectory_3(path, options_3);
return;
}
- ___getDirectory_4(path);
+ __getDirectory_4(path);
return;
}
@JSName('getDirectory')
@DomName('DirectoryEntry.getDirectory')
@DocsEditable
- void ___getDirectory_1(path, options, _EntryCallback successCallback, _ErrorCallback errorCallback) native;
+ void __getDirectory_1(path, options, _EntryCallback successCallback, _ErrorCallback errorCallback) native;
@JSName('getDirectory')
@DomName('DirectoryEntry.getDirectory')
@DocsEditable
- void ___getDirectory_2(path, options, _EntryCallback successCallback) native;
+ void __getDirectory_2(path, options, _EntryCallback successCallback) native;
@JSName('getDirectory')
@DomName('DirectoryEntry.getDirectory')
@DocsEditable
- void ___getDirectory_3(path, options) native;
+ void __getDirectory_3(path, options) native;
@JSName('getDirectory')
@DomName('DirectoryEntry.getDirectory')
@DocsEditable
- void ___getDirectory_4(path) native;
+ void __getDirectory_4(path) native;
@JSName('getDirectory')
@DomName('DirectoryEntry.getDirectory')
@@ -6429,38 +6449,38 @@ class DirectoryEntry extends Entry native "DirectoryEntry" {
void __getFile(String path, {Map options, _EntryCallback successCallback, _ErrorCallback errorCallback}) {
if (errorCallback != null) {
var options_1 = convertDartToNative_Dictionary(options);
- ___getFile_1(path, options_1, successCallback, errorCallback);
+ __getFile_1(path, options_1, successCallback, errorCallback);
return;
}
if (successCallback != null) {
var options_2 = convertDartToNative_Dictionary(options);
- ___getFile_2(path, options_2, successCallback);
+ __getFile_2(path, options_2, successCallback);
return;
}
if (options != null) {
var options_3 = convertDartToNative_Dictionary(options);
- ___getFile_3(path, options_3);
+ __getFile_3(path, options_3);
return;
}
- ___getFile_4(path);
+ __getFile_4(path);
return;
}
@JSName('getFile')
@DomName('DirectoryEntry.getFile')
@DocsEditable
- void ___getFile_1(path, options, _EntryCallback successCallback, _ErrorCallback errorCallback) native;
+ void __getFile_1(path, options, _EntryCallback successCallback, _ErrorCallback errorCallback) native;
@JSName('getFile')
@DomName('DirectoryEntry.getFile')
@DocsEditable
- void ___getFile_2(path, options, _EntryCallback successCallback) native;
+ void __getFile_2(path, options, _EntryCallback successCallback) native;
@JSName('getFile')
@DomName('DirectoryEntry.getFile')
@DocsEditable
- void ___getFile_3(path, options) native;
+ void __getFile_3(path, options) native;
@JSName('getFile')
@DomName('DirectoryEntry.getFile')
@DocsEditable
- void ___getFile_4(path) native;
+ void __getFile_4(path) native;
@JSName('getFile')
@DomName('DirectoryEntry.getFile')
@@ -10793,7 +10813,12 @@ class FormData 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
@@ -15686,13 +15711,13 @@ class MutationObserver native "MutationObserver,WebKitMutationObserver" {
@DocsEditable
void _observe(Node target, Map options) {
var options_1 = convertDartToNative_Dictionary(options);
- __observe_1(target, options_1);
+ _observe_1(target, options_1);
return;
}
@JSName('observe')
@DomName('MutationObserver.observe')
@DocsEditable
- void __observe_1(Node target, options) native;
+ void _observe_1(Node target, options) native;
@DomName('MutationObserver.takeRecords')
@DocsEditable
@@ -15924,7 +15949,7 @@ class Navigator native "Navigator" {
* window.navigator.getUserMedia(audio: true, video: true).then((stream) {
* var video = new VideoElement()
* ..autoplay = true
- * ..src = Url.createObjectUrl(stream);
+ * ..src = Url.createObjectUrlFromStream(stream);
* document.body.append(video);
* });
*
@@ -18357,6 +18382,26 @@ class RtcDataChannel extends EventTarget native "RTCDataChannel,DataChannel" {
@DocsEditable
void send(data) native;
+ @JSName('send')
+ @DomName('RTCDataChannel.send')
+ @DocsEditable
+ void sendBlob(Blob data) native;
+
+ @JSName('send')
+ @DomName('RTCDataChannel.send')
+ @DocsEditable
+ void sendByteBuffer(ByteBuffer data) native;
+
+ @JSName('send')
+ @DomName('RTCDataChannel.send')
+ @DocsEditable
+ void sendString(String data) native;
+
+ @JSName('send')
+ @DomName('RTCDataChannel.send')
+ @DocsEditable
+ void sendTypedData(TypedData data) native;
+
@DomName('RTCDataChannel.onclose')
@DocsEditable
Stream<Event> get onClose => closeEvent.forTarget(this);
@@ -18652,20 +18697,20 @@ class RtcPeerConnection extends EventTarget native "RTCPeerConnection,mozRTCPeer
void _createAnswer(_RtcSessionDescriptionCallback successCallback, [_RtcErrorCallback failureCallback, Map mediaConstraints]) {
if (mediaConstraints != null) {
var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints);
- __createAnswer_1(successCallback, failureCallback, mediaConstraints_1);
+ _createAnswer_1(successCallback, failureCallback, mediaConstraints_1);
return;
}
- __createAnswer_2(successCallback, failureCallback);
+ _createAnswer_2(successCallback, failureCallback);
return;
}
@JSName('createAnswer')
@DomName('RTCPeerConnection.createAnswer')
@DocsEditable
- void __createAnswer_1(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback, mediaConstraints) native;
+ void _createAnswer_1(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback, mediaConstraints) native;
@JSName('createAnswer')
@DomName('RTCPeerConnection.createAnswer')
@DocsEditable
- void __createAnswer_2(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback) native;
+ void _createAnswer_2(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback) native;
@JSName('createDTMFSender')
@DomName('RTCPeerConnection.createDTMFSender')
@@ -18695,20 +18740,20 @@ class RtcPeerConnection extends EventTarget native "RTCPeerConnection,mozRTCPeer
void _createOffer(_RtcSessionDescriptionCallback successCallback, [_RtcErrorCallback failureCallback, Map mediaConstraints]) {
if (mediaConstraints != null) {
var mediaConstraints_1 = convertDartToNative_Dictionary(mediaConstraints);
- __createOffer_1(successCallback, failureCallback, mediaConstraints_1);
+ _createOffer_1(successCallback, failureCallback, mediaConstraints_1);
return;
}
- __createOffer_2(successCallback, failureCallback);
+ _createOffer_2(successCallback, failureCallback);
return;
}
@JSName('createOffer')
@DomName('RTCPeerConnection.createOffer')
@DocsEditable
- void __createOffer_1(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback, mediaConstraints) native;
+ void _createOffer_1(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback, mediaConstraints) native;
@JSName('createOffer')
@DomName('RTCPeerConnection.createOffer')
@DocsEditable
- void __createOffer_2(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback) native;
+ void _createOffer_2(_RtcSessionDescriptionCallback successCallback, _RtcErrorCallback failureCallback) native;
@DomName('RTCPeerConnection.dispatchEvent')
@DocsEditable
@@ -21329,7 +21374,7 @@ class TextAreaElement extends _HTMLElement native "HTMLTextAreaElement" {
@DocsEditable
// http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#dom-textarea/input-setrangetext
@Experimental
- void setRangeText(String replacement, [int start, int end, String selectionMode]) native;
+ void setRangeText(String replacement, {int start, int end, String selectionMode}) native;
@DomName('HTMLTextAreaElement.setSelectionRange')
@DocsEditable
@@ -22295,7 +22340,16 @@ class Url native "URL" {
static String createObjectUrl(blob_OR_source_OR_stream) =>
JS('String',
'(self.URL || self.webkitURL).createObjectURL(#)',
- blob_OR_source_OR_stream);
+ blob_OR_source_OR_stream);
+
+ static String createObjectUrlFromSource(MediaSource source) =>
+ JS('String', '(self.URL || self.webkitURL).createObjectURL(#)', source);
+
+ static String createObjectUrlFromStream(MediaStream stream) =>
+ JS('String', '(self.URL || self.webkitURL).createObjectURL(#)', stream);
+
+ static String createObjectUrlFromBlob(Blob blob) =>
+ JS('String', '(self.URL || self.webkitURL).createObjectURL(#)', blob);
static void revokeObjectUrl(String url) =>
JS('void',
@@ -22622,6 +22676,26 @@ class WebSocket extends EventTarget native "WebSocket" {
@DocsEditable
void send(data) native;
+ @JSName('send')
+ @DomName('WebSocket.send')
+ @DocsEditable
+ void sendBlob(Blob data) native;
+
+ @JSName('send')
+ @DomName('WebSocket.send')
+ @DocsEditable
+ void sendByteBuffer(ByteBuffer data) native;
+
+ @JSName('send')
+ @DomName('WebSocket.send')
+ @DocsEditable
+ void sendString(String data) native;
+
+ @JSName('send')
+ @DomName('WebSocket.send')
+ @DocsEditable
+ void sendTypeData(TypedData data) native;
+
@DomName('WebSocket.onclose')
@DocsEditable
Stream<CloseEvent> get onClose => closeEvent.forTarget(this);
@@ -23453,10 +23527,10 @@ class Window extends EventTarget implements WindowBase native "Window,DOMWindow"
@Returns('Window|=Object')
WindowBase __getter__(index_OR_name) {
if ((index_OR_name is int || index_OR_name == null)) {
- return _convertNativeToDart_Window(___getter___1(index_OR_name));
+ return _convertNativeToDart_Window(__getter___1(index_OR_name));
}
if ((index_OR_name is String || index_OR_name == null)) {
- return _convertNativeToDart_Window(___getter___2(index_OR_name));
+ return _convertNativeToDart_Window(__getter___2(index_OR_name));
}
throw new ArgumentError("Incorrect number or type of arguments");
}
@@ -23465,13 +23539,13 @@ class Window extends EventTarget implements WindowBase native "Window,DOMWindow"
@DocsEditable
@Creates('Window|=Object')
@Returns('Window|=Object')
- ___getter___1(int index) native;
+ __getter___1(int index) native;
@JSName('__getter__')
@DomName('Window.__getter__')
@DocsEditable
@Creates('Window|=Object')
@Returns('Window|=Object')
- ___getter___2(String name) native;
+ __getter___2(String name) native;
@JSName('addEventListener')
@DomName('Window.addEventListener')
« 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