blob: 0f1396e6d575bd38a7c6480e2b38718eb5223444 [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.
[
Constructor([EnforceRange] unsigned long width, [EnforceRange] unsigned long height),
Exposed=(Window,Worker),
RuntimeEnabled=ExperimentalCanvasFeatures,
MeasureAs=OffscreenCanvas,
] interface OffscreenCanvas {
[RaisesException=Setter, EnforceRange] attribute unsigned long width;
[RaisesException=Setter, EnforceRange] attribute unsigned long height;
[RaisesException] ImageBitmap transferToImageBitmap();
[RaisesException, CallWith=ScriptState] Promise<Blob> convertToBlob(optional ImageEncodeOptions options);
};