Index: tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate |
diff --git a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate |
index 4a95f9a4071f7d572d1f2a3c5fc069b2b633359b..efa78d4d44e02900d3bf039527ece461a2e92f2a 100644 |
--- a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate |
+++ b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate |
@@ -45,7 +45,7 @@ $if DART2JS |
static bool get supportsCssCanvasContext => |
JS('bool', '!!(document.getCSSCanvasContext)'); |
$else |
- static bool get supportsCssCanvasContext => true; |
+ static bool get supportsCssCanvasContext => false; |
$endif |
@@ -75,7 +75,11 @@ $endif |
@DomName('Document.getCSSCanvasContext') |
CanvasRenderingContext getCssCanvasContext(String contextId, String name, |
int width, int height) { |
- return _getCssCanvasContext(contextId, name, width, height); |
+$if DART2JS |
+ if (HtmlDocument.supportsCssCanvasContext) |
+ return JS('CanvasRenderingContext', '#.getCSSCanvasContext(#, #, #, #)', this, contextId, name, width, height); |
+$endif |
+ throw new UnsupportedError("Not supported"); |
} |
@DomName('Document.head') |