Module Service_worker.Registration
Service registration objects.
type t
The type for
ServiceWorkerRegistration
objects.
val as_target : t -> Brr.Ev.target
as_target r
isr
as an event target.
val update : t -> unit Fut.or_error
update r
attempts to update the service worker ofr
.
val unregister : t -> bool Fut.or_error
unregister r
unregisters the service worker registration. This isfalse
if no registration was false.
val show_notification : ?opts:Brr_io.Notification.opts -> t -> Jstr.t -> unit Fut.or_error
show_notification r title ~opts
displays a notification with titletitle
an optionsopts
.
val get_notifications : ?tag:Jstr.t -> t -> Brr_io.Notification.t list Fut.or_error
get_notifications r ~tag
are notifications created viar
and tagged withtag
(or all of them if unspecified).
Properties
val installing : t -> service_worker option
installing r
is the installing service worker ofr
.
val waiting : t -> service_worker option
waiting r
is the installed service worker ofr
.
val active : t -> service_worker option
active r
is the active service worker ofr
.
navigation_preload r
is the navigation preload manager ofr
.
val update_via_cache : t -> Update_via_cache.t
update_via_cache r
is the update via cache property ofr
.