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

Unified Diff: tools/dom/templates/html/impl/impl_HTMLCanvasElement.darttemplate

Issue 13913002: More precise native type for context2D (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_HTMLCanvasElement.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_HTMLCanvasElement.darttemplate b/tools/dom/templates/html/impl/impl_HTMLCanvasElement.darttemplate
index 82bf5a766032ca6d9753fc0deef37a4552ec3a57..ef01381ece5b7505308c93fb7ff772ab91e62765 100644
--- a/tools/dom/templates/html/impl/impl_HTMLCanvasElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLCanvasElement.darttemplate
@@ -7,7 +7,12 @@ part of $LIBRARYNAME;
$(ANNOTATIONS)class $CLASSNAME$EXTENDS implements CanvasImageSource$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
/** An API for drawing on this canvas. */
+$if DART2JS
+ CanvasRenderingContext2D get context2D =>
+ JS('Null|CanvasRenderingContext2D', '#.getContext(#)', this, '2d');
+$else
CanvasRenderingContext2D get context2D => getContext('2d');
+$endif
@deprecated
CanvasRenderingContext2D get context2d => this.context2D;
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698