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.ServiceWorkerTypes.clients => promise<unit>

Parameters

WebAPI.ServiceWorkerTypes.clients

Return type

promise<unit>

get

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

let get: (
WebAPI.ServiceWorkerTypes.clients,
string,
) => promise<option<WebAPI.ServiceWorkerTypes.client>>

Parameters

WebAPI.ServiceWorkerTypes.clientsstring

Return type

promise<option<WebAPI.ServiceWorkerTypes.client>>

matchAll

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

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

openWindow

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

let openWindow: (
WebAPI.ServiceWorkerTypes.clients,
string,
) => promise<Null.t<WebAPI.ServiceWorkerTypes.windowClient>>

Parameters

WebAPI.ServiceWorkerTypes.clientsstring

Return type

promise<Stdlib.Null.t<WebAPI.ServiceWorkerTypes.windowClient>>