Module
Impulse.DOM.API
- Package
- purescript-impulse
- Repository
- mitchdzugan/purescript-impulse
#d_stash Source
d_stash :: forall a c e. DOM e c a -> DOM e c (ImpulseStash a)
d_stash inner
runs inner
but does not render in place, instead stashes whatever
was rendered such that it can be used later using d_apply
.
stashes are immutable and can be passed around as far as you like.
test :: forall e c. DOM e c Unit
test = do
ul_ anil do
stash <- d_stash do
li_ anil $ text "out"
li_ anil $ text "of"
li_ anil $ text "order?"
li_ anil $ text "You"
li_ anil $ text "thought"
li_ anil $ text "this"
li_ anil $ text "was"
d_apply stash
results in
<ul>
<li>You</li>
<li>thought</li>
<li>this</li>
<li>was</li>
<li>out</li>
<li>of</li>
<li>order?</li>
</ul>
#d_apply Source
d_apply :: forall a c e. ImpulseStash a -> DOM e c a
#ImpulseStash Source
data ImpulseStash :: Type -> Type
#stashRes Source
stashRes :: forall a. ImpulseStash a -> a
#ImpulseSSR Source
data ImpulseSSR :: Type -> Type
#ImpulseAttachment Source
data ImpulseAttachment :: Type -> Type
#attachRes Source
attachRes :: forall a. ImpulseAttachment a -> a
#withAlteredEnv Source
withAlteredEnv :: forall a c e2 e1. (e1 -> e2) -> DOM e2 c a -> DOM e1 c a