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 = any>(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 = any>(value: T, options?: StructuredSerializeOptions): T;
}
Hierarchy
- WindowOrWorkerGlobalScope (View Summary)
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
- createImageBitmap(
image: ImageBitmapSource,
options?: ImageBitmapOptions,
): Promise<ImageBitmap> Parameters
- image: ImageBitmapSource
Optional
options: ImageBitmapOptions
Returns Promise<ImageBitmap>
- createImageBitmap(
image: ImageBitmapSource,
sx: number,
sy: number,
sw: number,
sh: number,
options?: ImageBitmapOptions,
): Promise<ImageBitmap> Parameters
- image: ImageBitmapSource
- sx: number
- sy: number
- sw: number
- sh: number
Optional
options: ImageBitmapOptions
Returns Promise<ImageBitmap>
fetch
- fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>
Parameters
- input: RequestInfo | URL
Optional
init: RequestInit
Returns Promise<Response>
queueMicrotask
- queueMicrotask(callback: VoidFunction): void
Parameters
- callback: VoidFunction
Returns void
reportError
setInterval
- setInterval(
handler: TimerHandler,
timeout?: number,
...arguments: any[],
): number Parameters
- handler: TimerHandler
Optional
timeout: number- ...arguments: any[]
Returns number
setTimeout
- setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number
Parameters
- handler: TimerHandler
Optional
timeout: number- ...arguments: any[]
Returns number
structuredClone
- structuredClone<T = any>(value: T, options?: StructuredSerializeOptions): T
Type Parameters
Parameters
- value: T
Optional
options: StructuredSerializeOptions
Returns T
Available only in secure contexts.
MDN Reference