Module

Flame.Subscription

Package
purescript-flame-lynx
Repository
easafe/purescript-flame-lynx

Defines helpers for events from outside the view (e.g., global events) For view events, see Flame.Html.Attribute

#send Source

send :: forall id message. Show id => AppId id message -> message -> Effect Unit

Raises an arbitrary message on the given application

#onCustomEvent Source

onCustomEvent :: forall message. EventType -> message -> Subscription message

Subscribe to a CustomEvent that has no data associated

#onCustomEvent' Source

onCustomEvent' :: forall arg message. UnserializeState arg => EventType -> (arg -> Effect (Maybe message)) -> Subscription message

Subscribe to a CustomEvent

arg must be serializable since it might come from external JavaScript