| // Copyright 2015 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. |
| |
| // Note: If there're more context types implemented, they should be added here |
| // to form a union type of OffscreenCanvasRenderingContext |
| typedef OffscreenCanvasRenderingContext2D OffscreenRenderingContext; |
| |
| [ |
| Constructor([EnforceRange] unsigned long width, [EnforceRange] unsigned long height), |
| Exposed=(Window,Worker), |
| RuntimeEnabled=ExperimentalCanvasFeatures, |
| ] interface OffscreenCanvas { |
| [EnforceRange] attribute unsigned long width; |
| [EnforceRange] attribute unsigned long height; |
| |
| [RaisesException] OffscreenRenderingContext? getContext(DOMString contextId, optional CanvasContextCreationAttributes attributes); |
| [RaisesException] ImageBitmap transferToImageBitmap(); |
| }; |