Module
Halogen.VDom.Types
- Package
- purescript-halogen-vdom
- Repository
- purescript-halogen/purescript-halogen-vdom
#VDom Source
data VDom a wThe 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
Text StringElem (Maybe Namespace) ElemName a (Array (VDom a w))Keyed (Maybe Namespace) ElemName a (Array (Tuple String (VDom a w)))Widget wGrafted (Graft a w)
Instances
#renderWidget Source
renderWidget :: forall a b w x. (a -> b) -> (w -> VDom b x) -> VDom a w -> VDom b xReplaces "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.