blob: 1712f6c2d00d33d3ecd823af0cc2a9332db149e2 [file] [log] [blame]
// 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" };
partial interface OffscreenCanvas {
[CallWith=ExecutionContext, RaisesException, RuntimeEnabled=ExperimentalCanvasFeatures] OffscreenRenderingContext? getContext(OffscreenRenderingContextType contextType, optional CanvasContextCreationAttributes attributes);
};