Module Brr_io.Notification
Notifying users.
See the Notification API.
Permission
module Permission : sig ... end
Permission enum.
val permission : unit -> Permission.t
permission ()
is the permission granted by the user.
val request_permission : unit -> Permission.t Fut.or_error
request_permission ()
requests permission to display notifications.
Notifications
module Direction : sig ... end
Direction enum.
module Action : sig ... end
Actions.
val opts : ?dir:Direction.t -> ?lang:Jstr.t -> ?body:Jstr.t -> ?tag:Jstr.t -> ?image:Jstr.t -> ?icon:Jstr.t -> ?badge:Jstr.t -> ?timestamp_ms:int -> ?renotify:bool -> ?silent:bool -> ?require_interaction:bool -> ?data:'a -> ?actions:Action.t list -> unit -> opts
type t
The type for
Notification
objects.
val create : ?opts:opts -> Jstr.t -> t
create title ~opts
is a notification with titletitle
and optionsopts
.
val as_target : t -> Brr.Ev.target
as_target n
isn
as an event target.
Properties
val dir : t -> Direction.t
dir n
is the dir ofn
.
Events
module Ev : sig ... end
Notification events.