blob: 115e1a3e431cceab1e43d8c5b0bc7aa1317f899e [file] [log] [blame]
// 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.
// https://html.spec.whatwg.org/multipage/scripting.html#the-offscreencanvas-interface
[
Constructor([EnforceRange] unsigned long width, [EnforceRange] unsigned long height),
Exposed=(Window,Worker),
Transferable,
RuntimeEnabled=OffscreenCanvas,
MeasureAs=OffscreenCanvas
] interface OffscreenCanvas : EventTarget {
attribute [EnforceRange] unsigned long width;
attribute [EnforceRange] unsigned long height;
[CallWith=ScriptState, HighEntropy, MeasureAs=OffscreenCanvasTransferToImageBitmap, RaisesException] ImageBitmap transferToImageBitmap();
[CallWith=ScriptState, HighEntropy, MeasureAs=OffscreenCanvasConvertToBlob, RaisesException] Promise<Blob> convertToBlob(optional ImageEncodeOptions options);
};