ladybird/Userland/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.idl
Lucas CHOLLET 676fc5e8c6 LibWeb: Implement HTML::ImageBitmap
And the two methods of `WindowOrWorkerGlobalScope` that are used as
constructors for it.
2024-04-08 14:25:36 +02:00

47 lines
1.8 KiB
Plaintext

#import <Fetch/Request.idl>
#import <Fetch/Response.idl>
#import <HighResolutionTime/Performance.idl>
#import <HTML/ImageBitmap.idl>
#import <HTML/MessagePort.idl>
// FIXME: Support VoidFunction in the IDL parser
callback VoidFunction = undefined ();
// https://html.spec.whatwg.org/#timerhandler
typedef (DOMString or Function) TimerHandler;
// https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope
interface mixin WindowOrWorkerGlobalScope {
[Replaceable] readonly attribute USVString origin;
readonly attribute boolean isSecureContext;
readonly attribute boolean crossOriginIsolated;
// FIXME: undefined reportError(any e);
// base64 utility methods
DOMString btoa(DOMString data);
ByteString atob(DOMString data);
// timers
long setTimeout(TimerHandler handler, optional long timeout = 0, any... arguments);
undefined clearTimeout(optional long id = 0);
long setInterval(TimerHandler handler, optional long timeout = 0, any... arguments);
undefined clearInterval(optional long id = 0);
// microtask queuing
undefined queueMicrotask(VoidFunction callback);
// ImageBitmap
Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options = {});
Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options = {});
// structured cloning
any structuredClone(any value, optional StructuredSerializeOptions options = {});
// https://fetch.spec.whatwg.org/#fetch-method
[NewObject] Promise<Response> fetch(RequestInfo input, optional RequestInit init = {});
// https://w3c.github.io/hr-time/#the-performance-attribute
[Replaceable] readonly attribute Performance performance;
};