MCPcopy Create free account
hub / github.com/fontsource/fontsource / ServiceWorkerGlobalScope

Interface ServiceWorkerGlobalScope

api/worker-configuration.d.ts:303–383  ·  view source on GitHub ↗

* The **`ServiceWorkerGlobalScope`** interface of the Service Worker API represents the global execution context of a service worker. * Available only in secure contexts. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)

Source from the content-addressed store, hash-verified

301 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
302 */
303interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
304 DOMException: typeof DOMException;
305 WorkerGlobalScope: typeof WorkerGlobalScope;
306 btoa(data: string): string;
307 atob(data: string): string;
308 setTimeout(callback: (...args: any[]) => void, msDelay?: number): number;
309 setTimeout<Args extends any[]>(callback: (...args: Args) => void, msDelay?: number, ...args: Args): number;
310 clearTimeout(timeoutId: number | null): void;
311 setInterval(callback: (...args: any[]) => void, msDelay?: number): number;
312 setInterval<Args extends any[]>(callback: (...args: Args) => void, msDelay?: number, ...args: Args): number;
313 clearInterval(timeoutId: number | null): void;
314 queueMicrotask(task: Function): void;
315 structuredClone<T>(value: T, options?: StructuredSerializeOptions): T;
316 reportError(error: any): void;
317 fetch(input: RequestInfo | URL, init?: RequestInit<RequestInitCfProperties>): Promise<Response>;
318 self: ServiceWorkerGlobalScope;
319 crypto: Crypto;
320 caches: CacheStorage;
321 scheduler: Scheduler;
322 performance: Performance;
323 Cloudflare: Cloudflare;
324 readonly origin: string;
325 Event: typeof Event;
326 ExtendableEvent: typeof ExtendableEvent;
327 CustomEvent: typeof CustomEvent;
328 PromiseRejectionEvent: typeof PromiseRejectionEvent;
329 FetchEvent: typeof FetchEvent;
330 TailEvent: typeof TailEvent;
331 TraceEvent: typeof TailEvent;
332 ScheduledEvent: typeof ScheduledEvent;
333 MessageEvent: typeof MessageEvent;
334 CloseEvent: typeof CloseEvent;
335 ReadableStreamDefaultReader: typeof ReadableStreamDefaultReader;
336 ReadableStreamBYOBReader: typeof ReadableStreamBYOBReader;
337 ReadableStream: typeof ReadableStream;
338 WritableStream: typeof WritableStream;
339 WritableStreamDefaultWriter: typeof WritableStreamDefaultWriter;
340 TransformStream: typeof TransformStream;
341 ByteLengthQueuingStrategy: typeof ByteLengthQueuingStrategy;
342 CountQueuingStrategy: typeof CountQueuingStrategy;
343 ErrorEvent: typeof ErrorEvent;
344 MessageChannel: typeof MessageChannel;
345 MessagePort: typeof MessagePort;
346 EventSource: typeof EventSource;
347 ReadableStreamBYOBRequest: typeof ReadableStreamBYOBRequest;
348 ReadableStreamDefaultController: typeof ReadableStreamDefaultController;
349 ReadableByteStreamController: typeof ReadableByteStreamController;
350 WritableStreamDefaultController: typeof WritableStreamDefaultController;
351 TransformStreamDefaultController: typeof TransformStreamDefaultController;
352 CompressionStream: typeof CompressionStream;
353 DecompressionStream: typeof DecompressionStream;
354 TextEncoderStream: typeof TextEncoderStream;
355 TextDecoderStream: typeof TextDecoderStream;
356 Headers: typeof Headers;
357 Body: typeof Body;
358 Request: typeof Request;
359 Response: typeof Response;
360 WebSocket: typeof WebSocket;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected