Definition
HTML Standard defines WindowOrWorkerGlobalScope
interface mixin WindowOrWorkerGlobalScope {
[Replaceable] readonly attribute USVString origin;
readonly attribute boolean isSecureContext;
readonly attribute boolean crossOriginIsolated;
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 = {});
};
This interface mixin is extended in the following specifications:
- Fetch Standard
partial interface mixin WindowOrWorkerGlobalScope { [NewObject] Promise<Response> fetch(RequestInfo input, optional RequestInit init = {}); };
- Prioritized Task Scheduling
partial interface mixin WindowOrWorkerGlobalScope { [Replaceable] readonly attribute Scheduler scheduler; };
- High Resolution Time
partial interface mixin WindowOrWorkerGlobalScope { [Replaceable] readonly attribute Performance performance; };
- Indexed Database API 3.0
partial interface mixin WindowOrWorkerGlobalScope { [SameObject] readonly attribute IDBFactory indexedDB; };
- Service Workers Nightly
partial interface mixin WindowOrWorkerGlobalScope { [SecureContext, SameObject] readonly attribute CacheStorage caches; };
- Trusted Types
partial interface mixin WindowOrWorkerGlobalScope { readonly attribute TrustedTypePolicyFactory trustedTypes; };
- Web Cryptography API
partial interface mixin WindowOrWorkerGlobalScope { [SameObject] readonly attribute Crypto crypto; };
Consolidated IDL (across partials)
interface mixin WindowOrWorkerGlobalScope {
[Replaceable] readonly attribute USVString origin;
readonly attribute boolean isSecureContext;
readonly attribute boolean crossOriginIsolated;
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 = {});
[NewObject] Promise<Response> fetch(RequestInfo input, optional RequestInit init = {});
[Replaceable] readonly attribute Scheduler scheduler;
[Replaceable] readonly attribute Performance performance;
[SameObject] readonly attribute IDBFactory indexedDB;
[SecureContext, SameObject] readonly attribute CacheStorage caches;
readonly attribute TrustedTypePolicyFactory trustedTypes;
[SameObject] readonly attribute Crypto crypto;
};
Referring IDL interfaces/dictionaries
Referring specifications
- Fetch Standard refers to
WindowOrWorkerGlobalScope
- Prioritized Task Scheduling refers to
WindowOrWorkerGlobalScope
- High Resolution Time refers to
WindowOrWorkerGlobalScope
- Indexed Database API 3.0 refers to
WindowOrWorkerGlobalScope
- Service Workers Nightly refers to
WindowOrWorkerGlobalScope
- Trusted Types refers to
WindowOrWorkerGlobalScope
- Web Cryptography API refers to
WindowOrWorkerGlobalScope