Module Message.Broadcast_channel

Broadcast channels.

See the Broadcast Channel API.

type t

The type for BroadcastChannel objects.

val create : Jstr.t -> t

create n creates a channel named n.

val as_target : t ->

as_target b is b as an event target.

val name : t -> Jstr.t

name b is the name of b.

val close : t -> unit

close b closes b.

val post : t -> 'a -> unit

post b v sends v to all listeners of Message.message on b.