jon.recoil.org

Module Brr_io.Notification

Notifying users.

See the Notification API.

Permission

module Permission : sig ... end

Permission enum.

val permission : unit -> Brr_io.Notification.Permission.t

permission () is the permission granted by the user.

val request_permission : unit -> Brr_io.Notification.Permission.t Fut.or_error

request_permission () requests permission to display notifications.

Notifications

module Direction : sig ... end

Direction enum.

module Action : sig ... end

Actions.

type opts

The type for notification options.

val opts : ?dir:Brr_io.Notification.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:Brr_io.Notification.Action.t list -> unit -> Brr_io.Notification.opts
type t

The type for Notification objects.

type notification = Brr_io.Notification.t

See t .

create title ~opts is a notification with title title and options opts.

val close : Brr_io.Notification.t -> unit

close n closes n.

as_target n is n as an event target.

Properties

action n are the actions of n.

badge n is the badge of n.

body n is the body of n.

val data : Brr_io.Notification.t -> 'a

data n is the data of n. Warning. This is unsafe, constrain the result type.

lang n is the lang of n.

tag n is the tag of n.

icon n is the icon of n.

image n is the image of n.

val renotify : Brr_io.Notification.t -> bool

renotify n indicates n replaces an old notification.

val require_interaction : Brr_io.Notification.t -> bool

require_interaction n indicates n requires interaction.

val silent : Brr_io.Notification.t -> bool

silent n indicates n should be silent.

val timestamp_ms : Brr_io.Notification.t -> int

timestamp_ms n is the timestamp of n.

title n is the title of n.

Events

module Ev : sig ... end

Notification events.