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 f659b770e31e4ab709f0ddc1b0bba9e73e31f1a4..f1fff678094758c2f49c8855c5f1289e9433c2f2 100644 |
--- a/sdk/lib/html/dart2js/html_dart2js.dart |
+++ b/sdk/lib/html/dart2js/html_dart2js.dart |
@@ -967,7 +967,8 @@ class CanvasElement extends Element implements CanvasImageSource native "*HTMLCa |
String toDataUrl(String type, [num quality]) native; |
/** An API for drawing on this canvas. */ |
- CanvasRenderingContext2D get context2D => getContext('2d'); |
+ CanvasRenderingContext2D get context2D => |
+ JS('Null|CanvasRenderingContext2D', '#.getContext(#)', this, '2d'); |
@deprecated |
CanvasRenderingContext2D get context2d => this.context2D; |