Skip to content

Clients

Types

clientQueryOptions

type clientQueryOptions = {
mutable includeUncontrolled?: bool,
mutable type_?: string,
}

Record fields

includeUncontrolled
option< bool >
type_
option< string >

Values

claim

Allows an active service worker to set itself as the controller for all clients within its scope. Read more on MDN

let claim: WebAPI.ServiceWorkerAPI.clients => promise<unit>

Parameters

WebAPI.ServiceWorkerAPI.clients

Return type

promise< unit >

get

Returns a Promise for a Client matching a given id. Read more on MDN

let get: (
WebAPI.ServiceWorkerAPI.clients,
string,
) => promise<Nullable.t<WebAPI.ServiceWorkerAPI.client>>

Parameters

WebAPI.ServiceWorkerAPI.clients string

Return type

promise< Stdlib.Nullable.t< WebAPI.ServiceWorkerAPI.client > >

matchAll

Returns a Promise for an array of Client objects matching the given options. Read more on MDN

let matchAll: (
WebAPI.ServiceWorkerAPI.clients,
~options: clientQueryOptions=?,
) => promise<array<WebAPI.ServiceWorkerAPI.client>>

Parameters

WebAPI.ServiceWorkerAPI.clients option< clientQueryOptions >

Return type

promise< array< WebAPI.ServiceWorkerAPI.client > >

openWindow

Opens a new browser window for a given URL and returns a Promise for the new WindowClient. Read more on MDN

let openWindow: (
WebAPI.ServiceWorkerAPI.clients,
string,
) => promise<WebAPI.ServiceWorkerAPI.windowClient>