Module

Flame.Subscription

Package
purescript-flame
Repository
easafe/purescript-flame

Defines helpers for events from outside the view (e.g., custom/window or document 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 arg message. UnserializeState arg => EventType -> (arg -> message) -> Subscription message

Subscribe to a CustomEvent

arg must be serializable since it might come from external JavaScript

#onCustomEvent' Source

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

Subscribe to a CustomEvent that has no data associated