hyperbole-0.5.0: Interactive HTML apps using type-safe serverside Haskell
Safe HaskellNone
LanguageGHC2021

Web.Hyperbole.Effect.Client

Synopsis

Documentation

trigger :: forall id (es :: [Effect]) view. (HyperView id es, HyperViewHandled id view, Hyperbole :> es) => id -> Action id -> Eff (Reader view ': es) () Source #

Trigger an action for an arbitrary HyperView

#EXAMPLE /advanced

#EMBED ExamplePageAdvanced.hs instance HyperView Controls

pushEvent :: forall a (es :: [Effect]). (ToJSON a, Hyperbole :> es) => Text -> a -> Eff es () Source #

Dispatch a custom javascript event. This is emitted on the current hyper view and bubbles up to the document

#EXAMPLE /javascript

#EMBED ExamplePageJavascript.hs instance HyperView Message
#EMBED static/custom.js function listenServerEvents

pageTitle :: forall (es :: [Effect]). Hyperbole :> es => Text -> Eff es () Source #

Set the document title

#EMBED ExampleDocsClient.hs page