blob: d7d5fc9990446a45698d1b698a696e103a4ed1e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// 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/multipage/scripting.html#the-offscreencanvas-interface
typedef (OffscreenCanvasRenderingContext2D or
WebGLRenderingContext or
WebGL2RenderingContext) OffscreenRenderingContext;
enum OffscreenRenderingContextType { "2d", "webgl", "webgl2" };
[
ImplementedAs=OffscreenCanvasModule
] partial interface OffscreenCanvas {
[CallWith=ExecutionContext, RaisesException, RuntimeEnabled=OffscreenCanvas] OffscreenRenderingContext? getContext(OffscreenRenderingContextType contextType, optional CanvasContextCreationAttributesModule attributes);
};
|