Module

Halogen.VDom.Types

Package
purescript-halogen-vdom
Repository
slamdata/purescript-halogen-vdom

#VDom Source

data VDom a w

The core virtual-dom tree type, where a is the type of attributes, and w is the type of "widgets". Widgets are machines that have complete control over the lifecycle of some DOM.Node.

The Grafted constructor and associated machinery enables bimap fusion using a Coyoneda-like encoding.

Constructors

Instances

#renderWidget Source

renderWidget :: forall x w b a. (a -> b) -> (w -> VDom b x) -> VDom a w -> VDom b x

Replaces "widgets" in the VDom with the ability to turn them into other VDom nodes.

Using this function will fuse any Grafts present in the VDom.

#Graft Source

data Graft :: Type -> Type -> Type

Instances

#GraftX Source

data GraftX a a' w w'

Constructors

#graft Source

graft :: forall w' w a' a. GraftX a a' w w' -> Graft a' w'

#unGraft Source

unGraft :: forall r w' a'. (forall w a. GraftX a a' w w' -> r) -> Graft a' w' -> r

#runGraft Source

runGraft :: forall w' a'. Graft a' w' -> VDom a' w'

#ElemName Source