OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // https://html.spec.whatwg.org/#the-canvas-element | 5 // https://html.spec.whatwg.org/#the-canvas-element |
6 | 6 |
7 typedef (CanvasRenderingContext2D or | 7 typedef (CanvasRenderingContext2D or |
8 WebGLRenderingContext or | 8 WebGLRenderingContext or |
9 WebGL2RenderingContext or | 9 WebGL2RenderingContext or |
10 ImageBitmapRenderingContext) RenderingContext; | 10 ImageBitmapRenderingContext) RenderingContext; |
11 | 11 |
12 partial interface HTMLCanvasElement | 12 partial interface HTMLCanvasElement |
13 { | 13 { |
14 // The PermissiveDictionaryConversion extended attribute is needed to allow
the | 14 // The PermissiveDictionaryConversion extended attribute is needed to allow
the |
15 // autogenerated code to match the behavior of the custom binding. Web IDL | 15 // autogenerated code to match the behavior of the custom binding. Web IDL |
16 // requires throwing TypeError if the incoming argument is not an object typ
e | 16 // requires throwing TypeError if the incoming argument is not an object typ
e |
17 // (and is not undefined or null). The binding must ignore this. | 17 // (and is not undefined or null). The binding must ignore this. |
18 // Related spec issue: https://github.com/whatwg/html/issues/595 | 18 // Related spec issue: https://github.com/whatwg/html/issues/595 |
19 RenderingContext? getContext(DOMString contextId, [PermissiveDictionaryConve
rsion] optional CanvasContextCreationAttributes attributes); | 19 [RaisesException] RenderingContext? getContext(DOMString contextId, [Permiss
iveDictionaryConversion] optional CanvasContextCreationAttributes attributes); |
20 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] OffscreenCanvas
transferControlToOffscreen(); | 20 [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] OffscreenCanvas
transferControlToOffscreen(); |
21 }; | 21 }; |
OLD | NEW |