Skip to content

Clients

Types

clientQueryOptions

type clientQueryOptions = {
mutable includeUncontrolled?: bool,
@as("type") mutable type_?: string,
}

Record fields

includeUncontrolled
option<bool>
type_
option<string>

t

type t = WebAPI.ServiceWorkerTypes.clients

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

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

string

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>>

Parameters

~options: clientQueryOptions=?

Return type

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

string

Return type

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