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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

Issue 18500010: Make type parameter in toDataUrl have an optional default value as per the spec. (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:
Download patch
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/html/canvas_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 62fa29ded7d64d48d552b7171dc507d499826306..db9c4d25536706f53cf5eb6a7fb8be65bbb8abf4 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -1091,7 +1091,7 @@ class CanvasElement extends _HTMLElement implements CanvasImageSource {
*/
@DomName('HTMLCanvasElement.toDataURL')
@DocsEditable()
- String toDataUrl(String type, [num quality]) native "HTMLCanvasElement_toDataURL_Callback";
+ String $dom_toDataUrl(String type, [num quality]) native "HTMLCanvasElement_toDataURL_Callback";
@DomName('HTMLCanvasElement.onwebglcontextlost')
@DocsEditable()
@@ -1127,6 +1127,9 @@ class CanvasElement extends _HTMLElement implements CanvasImageSource {
}
return context;
}
+
+ String toDataUrl([String type = 'image/png', num quality]) =>
+ $dom_toDataUrl(type, quality);
}
// 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
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tests/html/canvas_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698