Module

Halogen.Aff

Package
purescript-halogen
Repository
slamdata/purescript-halogen

Re-exports from Halogen.Aff.Driver

#HalogenIO Source

type HalogenIO f o m = { query :: f ~> m, subscribe :: Consumer o m Unit -> m Unit }

A record produced when the root component in a Halogen UI has been run. query allows external sources to query the root component and subscribe allows external consumers to receive messages raised by the root component.

Re-exports from Halogen.Aff.Effects

#HalogenEffects Source

type HalogenEffects eff = (avar :: AVAR, dom :: DOM, exception :: EXCEPTION, ref :: REF | eff)

A type alias for the basic row of effects involved in running Halogen with Aff-based drivers.

Re-exports from Halogen.Aff.Util

#selectElement Source

selectElement :: forall eff. QuerySelector -> Aff (dom :: DOM | eff) (Maybe HTMLElement)

Tries to find an element in the document.

#runHalogenAff Source

runHalogenAff :: forall x eff. Aff (HalogenEffects eff) x -> Eff (HalogenEffects eff) Unit

Runs an Aff value of the type commonly used by Halogen components. Any unhandled errors will be re-thrown as exceptions.

#awaitLoad Source

awaitLoad :: forall eff. Aff (dom :: DOM | eff) Unit

Waits for the document to load.

#awaitBody Source

awaitBody :: forall eff. Aff (dom :: DOM | eff) HTMLElement

Waits for the document to load and then finds the body element.