Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OffscreenCanvas API #22168

Closed

Added webidl file for OffscreenCanvas

  • Loading branch information
Chiaggs committed Nov 1, 2018
commit 893ae3b3350f8081f7a56944c60f3f262f585802
@@ -0,0 +1,29 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */



typedef (OffscreenCanvasRenderingContext2D or WebGLRenderingContext or WebGL2RenderingContext) OffscreenRenderingContext;

dictionary ImageEncodeOptions {
DOMString type = "image/png";
unrestricted double quality = 1.0;
};

enum OffscreenRenderingContextId { "2d", "webgl", "webgl2" };

[Constructor([EnforceRange] unsigned long long width, [EnforceRange] unsigned long long height), Exposed=(Window,Worker), Transferable]
[Pref="dom.offscreen_canvas.enabled"]
interface OffscreenCanvas : EventTarget {
attribute [EnforceRange] unsigned long long width;
attribute [EnforceRange] unsigned long long height;

OffscreenRenderingContext? getContext(OffscreenRenderingContextId contextId, optional any options = null);
ImageBitmap transferToImageBitmap();
//Promise<Blob> convertToBlob(optional ImageEncodeOptions options);
};




ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.