Type Alias: ServiceWorkerScope
ServiceWorkerScope =
object
Defined in: serviceWorker/createServiceWorker.ts:57
The subset of ServiceWorkerGlobalScope this worker uses, typed
structurally so the package needs no webworker lib and tests can pass a
fake.
Properties
addEventListener
addEventListener: <
K>(type,listener) =>void
Defined in: serviceWorker/createServiceWorker.ts:76
Type Parameters
| Type Parameter |
|---|
K extends keyof Listeners |
Parameters
| Parameter | Type |
|---|---|
type | K |
listener | Listeners[K] |
Returns
void
caches
caches:
CacheStorage
Defined in: serviceWorker/createServiceWorker.ts:59
clients
clients:
object
Defined in: serviceWorker/createServiceWorker.ts:62
claim
claim: () =>
Promise<void>
Returns
Promise<void>
matchAll
matchAll: (
options) =>Promise<WindowClient[]>
Parameters
| Parameter | Type |
|---|---|
options | { includeUncontrolled: boolean; type: "window"; } |
options.includeUncontrolled | boolean |
options.type | "window" |
Returns
Promise<WindowClient[]>
openWindow
openWindow: (
url) =>Promise<unknown>
Parameters
| Parameter | Type |
|---|---|
url | string |
Returns
Promise<unknown>
fetch
fetch: (
request) =>Promise<Response>
Defined in: serviceWorker/createServiceWorker.ts:60
Parameters
| Parameter | Type |
|---|---|
request | Request |
Returns
Promise<Response>
location
location:
object
Defined in: serviceWorker/createServiceWorker.ts:58
origin
origin:
string
search
search:
string
registration
registration:
object
Defined in: serviceWorker/createServiceWorker.ts:70
showNotification
showNotification: (
title,options) =>Promise<void>
Parameters
| Parameter | Type |
|---|---|
title | string |
options | NotificationOptions |
Returns
Promise<void>
skipWaiting
skipWaiting: () =>
Promise<void>
Defined in: serviceWorker/createServiceWorker.ts:61
Returns
Promise<void>