Module

Text.Smolder.Renderer.DOM

Package
purescript-smolder-dom
Repository
bodil/purescript-smolder-dom

#render Source

render :: Element -> Markup EventListener -> Effect Unit

Render some Smolder markup into a target DOM element.

Please note that this only appends the Smolder markup as new child nodes; it does not overwrite the target's current children.

#patch Source

patch :: Element -> Markup EventListener -> Effect Unit

Update a DOM element's children in place.

This will update existing nodes in place where possible, preserving their state. Other nodes will be created or deleted as appropriate.

Please note that this function is currently not very smart -- it can't tell if a child node has moved inside its parent, and will not be able to reuse such nodes. (TODO)