Interface WindowOrWorkerGlobalScope
interface WindowOrWorkerGlobalScope {
caches: CacheStorage;
crossOriginIsolated: boolean;
crypto: Crypto;
indexedDB: IDBFactory;
isSecureContext: boolean;
origin: string;
performance: Performance;
atob(data: string): string;
btoa(data: string): string;
clearInterval(id: number): void;
clearTimeout(id: number): void;
createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
queueMicrotask(callback: VoidFunction): void;
reportError(e: any): void;
setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
structuredClone<T>(value: T, options?: StructuredSerializeOptions): T;
}
caches: CacheStorage;
crossOriginIsolated: boolean;
crypto: Crypto;
indexedDB: IDBFactory;
isSecureContext: boolean;
origin: string;
performance: Performance;
atob(data: string): string;
btoa(data: string): string;
clearInterval(id: number): void;
clearTimeout(id: number): void;
createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
queueMicrotask(callback: VoidFunction): void;
reportError(e: any): void;
setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
structuredClone<T>(value: T, options?: StructuredSerializeOptions): T;
}
Hierarchy
- WindowOrWorkerGlobalScope (view full)
Properties
Readonly
caches
Readonly
crossOriginIsolated
crossOriginIsolated : boolean
Readonly
crypto
Readonly
indexedDB
Readonly
isSecureContext
isSecureContext : boolean
Readonly
origin
origin: string
Readonly
performance
Methods
atob
btoa
clearInterval
clearTimeout
createImageBitmap
- create
Image (image, options?): Promise<ImageBitmap>Bitmap Parameters
- image: ImageBitmapSource
Optional
options: ImageBitmapOptions
Returns Promise<ImageBitmap>
- create
Image (image, sx, sy, sw, sh, options?): Promise<ImageBitmap>Bitmap Parameters
- image: ImageBitmapSource
- sx: number
- sy: number
- sw: number
- sh: number
Optional
options: ImageBitmapOptions
Returns Promise<ImageBitmap>
fetch
- fetch(input, init?): Promise<Response>
Parameters
- input: RequestInfo | URL
Optional
init: RequestInit
Returns Promise<Response>
queueMicrotask
- queue
Microtask (callback): void Parameters
- callback: VoidFunction
Returns void
reportError
setInterval
- set
Interval (handler, timeout?, ...arguments): number Parameters
- handler: TimerHandler
Optional
timeout: numberRest
...arguments: any[]
Returns number
setTimeout
- set
Timeout (handler, timeout?, ...arguments): number Parameters
- handler: TimerHandler
Optional
timeout: numberRest
...arguments: any[]
Returns number
structuredClone
- structured
Clone <T>(value, options?): T Type Parameters
Parameters
- value: T
Optional
options: StructuredSerializeOptions
Returns T
Available only in secure contexts.
MDN Reference