Module
Bonsai.DOM.Primitive  
- Package
- purescript-bonsai
- Repository
- grmble/purescript-bonsai
Primitive DOM Helpers
This module is used from Bonsai.VirtualDom, so it can't depend on anything except Bonsai.Types
Since the VirtualDom does most of the DOM handling, only some functionality is needed in addition to that (e.g. elementById, setting the focus, ...)
This module does not distinguish DOM nodes and elements. If you need additional functionaliy, Element is just a newtype on a foreign - just use it with a different DOM module.
#RequestAnimationFrameId Source
#clearElement Source
clearElement :: forall eff. Element -> Eff (bonsai :: BONSAI | eff) UnitClear the element.
Removes all child nodes of the element.
#focusElement Source
focusElement :: forall eff. Element -> Eff (bonsai :: BONSAI | eff) UnitFocus the element
#requestAnimationFrame Source
requestAnimationFrame :: forall eff. Eff (bonsai :: BONSAI | eff) Unit -> Window -> Eff (bonsai :: BONSAI | eff) RequestAnimationFrameIdRequest an animation frame.
#selectInputElementText Source
selectInputElementText :: forall eff. Element -> Eff (bonsai :: BONSAI | eff) UnitSelect the input elements text.