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 f282d2cf8dbb44d12e9bf5d4de4085ad41bd6e2c..c6499621c69f3aa639671a25d10f101762848158 100644 |
--- a/sdk/lib/html/dart2js/html_dart2js.dart |
+++ b/sdk/lib/html/dart2js/html_dart2js.dart |
@@ -949,7 +949,7 @@ class CanvasElement extends Element implements CanvasImageSource native "*HTMLCa |
* Example usage: |
* |
* CanvasElement canvas = new CanvasElement(); |
- * var ctx = canvas.context2d |
+ * var ctx = canvas.context2D |
* ..fillStyle = "rgb(200,0,0)" |
* ..fillRect(10, 10, 55, 50); |
* var dataUrl = canvas.toDataURL("image/jpeg", 0.95); |
@@ -974,7 +974,11 @@ class CanvasElement extends Element implements CanvasImageSource native "*HTMLCa |
@DocsEditable |
String toDataUrl(String type, [num quality]) native; |
- CanvasRenderingContext2D get context2d => getContext('2d'); |
+ /** An API for drawing on this canvas. */ |
+ CanvasRenderingContext2D get context2D => getContext('2d'); |
+ |
+ @deprecated |
+ CanvasRenderingContext2D get context2d => this.context2D; |
@SupportedBrowser(SupportedBrowser.CHROME) |
@SupportedBrowser(SupportedBrowser.FIREFOX) |
@@ -1012,7 +1016,7 @@ class CanvasElement extends Element implements CanvasImageSource native "*HTMLCa |
* Example usage: |
* |
* var canvas = new CanvasElement(width: 600, height: 600); |
- * var ctx = canvas.context2d; |
+ * var ctx = canvas.context2D; |
* ctx.clearRect(0, 0, 600, 600); |
* ctx.save(); |
* // Create radial gradient. |
@@ -1062,7 +1066,7 @@ class CanvasGradient native "*CanvasGradient" { |
* Example usage: |
* |
* var canvas = new CanvasElement(width: 600, height: 600); |
- * var ctx = canvas.context2d; |
+ * var ctx = canvas.context2D; |
* var img = new ImageElement(); |
* // Image src needs to be loaded before pattern is applied. |
* img.onLoad.listen((event) { |
@@ -1485,7 +1489,7 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "*CanvasRen |
* will allow, the image will be clipped to fit the available space. |
* |
* CanvasElement canvas = new CanvasElement(width: 600, height: 600); |
- * CanvasRenderingContext2D ctx = canvas.context2d; |
+ * CanvasRenderingContext2D ctx = canvas.context2D; |
* ImageElement img = document.query('img'); |
* img.width = 100; |
* img.height = 100; |
@@ -1543,7 +1547,7 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "*CanvasRen |
* available space. |
* |
* CanvasElement canvas = new CanvasElement(width: 600, height: 600); |
- * CanvasRenderingContext2D ctx = canvas.context2d; |
+ * CanvasRenderingContext2D ctx = canvas.context2D; |
* ImageElement img = document.query('img'); |
* |
* ctx.drawImage(img, 100, 100); |
@@ -1578,7 +1582,7 @@ class CanvasRenderingContext2D extends CanvasRenderingContext native "*CanvasRen |
* will allow, the image will be clipped to fit the available space. |
* |
* CanvasElement canvas = new CanvasElement(width: 600, height: 600); |
- * CanvasRenderingContext2D ctx = canvas.context2d; |
+ * CanvasRenderingContext2D ctx = canvas.context2D; |
* ImageElement img = document.query('img'); |
* img.width = 100; |
* img.height = 100; |