Module Brr_webworkers.Service_workerSource

Service workers.

See the Service Worker API.

The fetch caches and events are in Brr_io.Fetch.

Registration

These APIs are used by the web page to install the service worker. Start your journey with Service_worker.Container.of_navigator.

Sourcemodule Update_via_cache : sig ... end

Update via cache enum.

Sourcemodule State : sig ... end

State enum.

Sourcetype t

The type for ServiceWorker objects.

Sourcetype service_worker = t

See t.

Sourceval as_worker : t -> Worker.t

as_worker w is w as a worker.

Sourceval as_target : t -> Brr.Ev.target

as_target w is w as an event target.

Sourceval script_url : t -> Jstr.t

script_url w is the script URL specified during registration for w.

Sourceval state : t -> State.t

state w is the state of w.

Ressources preloading

Sourcemodule Registration : sig ... end

Service registration objects.

Sourcemodule Container : sig ... end

Service worker containers.

Service worker context

These APIs are used by the service worker.

Sourcemodule Client : sig ... end

Client objects.

Sourcemodule Clients : sig ... end

Clients objects.

Sourcemodule G : sig ... end

Service worker global properties and functions.