summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/canvas/htmlcanvas/html_canvas_element_module_support_webgl2_compute.idl
blob: 8df9faac92ac6096a6ddca90dcc95ab5047b24ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://html.spec.whatwg.org/C/#the-canvas-element

// This file is currently forked between html_canvas_element_module.idl and
// html_canvas_element_module_support_webgl2_compute.idl. Update both files.

typedef (CanvasRenderingContext2D or
         WebGLRenderingContext or
         WebGL2RenderingContext or
         WebGL2ComputeRenderingContext or
         ImageBitmapRenderingContext or
         GPUCanvasContext) RenderingContext;

[
    ImplementedAs=HTMLCanvasElementModule
] partial interface HTMLCanvasElement
{
    // The PermissiveDictionaryConversion extended attribute is needed to allow the
    // autogenerated code to match the behavior of the custom binding. Web IDL
    // requires throwing TypeError if the incoming argument is not an object type
    // (and is not undefined or null). The binding must ignore this.
    // Related spec issue: https://github.com/whatwg/html/issues/595
    [RaisesException] RenderingContext? getContext(DOMString contextId, [PermissiveDictionaryConversion] optional CanvasContextCreationAttributesModule attributes = {});
    [CallWith=ExecutionContext, RaisesException, MeasureAs=OffscreenCanvas, RuntimeEnabled=SurfaceEmbeddingFeatures] OffscreenCanvas transferControlToOffscreen();
};