| 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 50c46d195684fceceb8e5b0c1c0123aa959e1f4d..d25abfb09553fa4785aca41373051b1405e4ff87 100644
|
| --- a/tools/dom/templates/html/impl/impl_HTMLCanvasElement.darttemplate
|
| +++ b/tools/dom/templates/html/impl/impl_HTMLCanvasElement.darttemplate
|
| @@ -6,9 +6,26 @@ part of html;
|
|
|
| $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
|
| $!MEMBERS
|
| -
|
| -$if DART2JS
|
| - CanvasRenderingContext getContext(String contextId) native;
|
| -$endif
|
| CanvasRenderingContext2D get context2d => getContext('2d');
|
| +
|
| + @SupportedBrowser(SupportedBrowser.CHROME)
|
| + @SupportedBrowser(SupportedBrowser.FIREFOX)
|
| + @Experimental
|
| + WebGLRenderingContext getContext3d({alpha: true, depth: true, stencil: false,
|
| + antialias: true, premultipliedAlpha: true, preserveDrawingBuffer: false}) {
|
| +
|
| + var options = {
|
| + 'alpha': alpha,
|
| + 'depth': depth,
|
| + 'stencil': stencil,
|
| + 'antialias': antialias,
|
| + 'premultipliedAlpha': premultipliedAlpha,
|
| + 'preserveDrawingBuffer': preserveDrawingBuffer,
|
| + };
|
| + var context = getContext('webgl', options);
|
| + if (context == null) {
|
| + context = getContext('experimental-webgl', options);
|
| + }
|
| + return context;
|
| + }
|
| }
|
|
|