2018-09-13 23:04:55 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2015-10-12 06:21:03 +03:00
|
|
|
/* 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/.
|
|
|
|
*
|
|
|
|
* For more information on this interface, please see
|
|
|
|
* https://wiki.whatwg.org/wiki/OffscreenCanvas
|
|
|
|
*/
|
|
|
|
|
2015-12-18 09:52:17 +03:00
|
|
|
[Constructor(unsigned long width, unsigned long height),
|
|
|
|
Exposed=(Window,Worker),
|
2019-06-13 12:01:41 +03:00
|
|
|
Pref="gfx.offscreencanvas.enabled"]
|
2015-10-12 06:21:03 +03:00
|
|
|
interface OffscreenCanvas : EventTarget {
|
|
|
|
[Pure, SetterThrows]
|
|
|
|
attribute unsigned long width;
|
|
|
|
[Pure, SetterThrows]
|
|
|
|
attribute unsigned long height;
|
|
|
|
|
|
|
|
[Throws]
|
|
|
|
nsISupports? getContext(DOMString contextId,
|
|
|
|
optional any contextOptions = null);
|
2015-12-18 09:52:17 +03:00
|
|
|
|
2017-10-12 21:14:54 +03:00
|
|
|
[Throws]
|
2015-12-18 09:52:17 +03:00
|
|
|
ImageBitmap transferToImageBitmap();
|
2015-12-18 09:52:17 +03:00
|
|
|
[Throws]
|
|
|
|
Promise<Blob> toBlob(optional DOMString type = "",
|
|
|
|
optional any encoderOptions);
|
2015-10-12 06:21:03 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
// OffscreenCanvas implements Transferable;
|