package js_of_ocaml
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=a991ce25175a5a13240c8bf64354b8f35e0a8d7223b90bef01ba32bc6f929cf4
sha512=ce476986cb2c78990f29b1d7a01bb173a0d30ad0e0a80ba7bde9aa8365952ed01eda4935d92a323b982b0c1c897b20ef01eabe75fe80e4da858f73f6a2d25232
doc/js_of_ocaml/Js_of_ocaml/ServiceWorker/index.html
Module Js_of_ocaml.ServiceWorkerSource
Service Workers.
This module covers both sides of the API: the page-facing registration API (container, serviceWorkerContainer, serviceWorkerRegistration, serviceWorker) and the worker-side global scope (global, serviceWorkerGlobalScope and its events). The Cache API used inside a worker lives in Cache.
Service Workers require a secure context. The Promise-typed members use Promise.
A service worker, as seen from a controlled page. Inherits EventTarget.
Options for serviceWorkerContainer##register_withOptions. Create an empty record with empty_registration_options.
The state of a registration's navigation preload, as resolved by navigationPreloadManager##getState.
Manages navigation preloading for a serviceWorkerRegistration, exposed as its navigationPreload.
A registration of a service worker against a scope. Inherits EventTarget.
The page-facing entry point, exposed as navigator.serviceWorker (see container). Inherits EventTarget.
navigator.serviceWorker, or undefined when service workers are not supported (including non-secure contexts).
Whether navigator.serviceWorker is available in the current environment.
Service worker global scope
The following bindings are meant to be used from inside a service worker (see global); they are not available on a controlled page.
Base class of events that may extend the service worker's lifetime via waitUntil.
The event passed to the worker's fetch handler.
The event delivered to the worker's message / messageerror handlers. Unlike a plain Dom_html.messageEvent it extends extendableEvent, so the handler can call waitUntil to keep the worker alive until asynchronous processing of the message finishes. The type parameter 'a is the type of the data payload.
A client (a Window, worker or shared worker) controlled by the worker.
A client that is a top-level browsing context (a window/tab).
Options for clients##matchAll_withOptions. Create an empty record with empty_clients_query_options.
The worker's clients object, used to enumerate and message controlled clients.
The global scope of a running service worker (its self). Inherits EventTarget.
The service worker's global scope. Only meaningful when the current code is actually running as a service worker.