Module

Web.IncrementalDOM

Package
purescript-incremental-dom
Repository
mbid/purescript-incremental-dom

#IDOM Source

data IDOM :: Effect

#elementOpen Source

elementOpen :: forall e. String -> Maybe String -> Array (Tuple String Foreign) -> Array (Tuple String Foreign) -> Eff (idom :: IDOM | e) HTMLElement

elementOpen tag key staticProperties properties declares a tag Element with optional key, a list of (unchecked) staticProperties and (checked) dynamicProperties at the current location in the document.

#elementOpenStart Source

elementOpenStart :: forall e. String -> Maybe String -> Array (Tuple String Foreign) -> Eff (idom :: IDOM | e) Unit

Used with attr and elementOpenEnd to declare an element. elementOpenStart tag key staticProperties declares the start of the attribute list of a tag Element with optional key and a list of (unchecked) staticProperties at the current location in the document tree.

#attr Source

attr :: forall e. String -> Foreign -> Eff (idom :: IDOM | e) Unit

Used with attr and elementOpenEnd to declare an element.

#elementOpenEnd Source

elementOpenEnd :: forall e. Eff (idom :: IDOM | e) HTMLElement

Used with attr and elementOpenEnd to declare an element.

#elementClose Source

elementClose :: forall e. String -> (Eff (idom :: IDOM | e) HTMLElement)

Signifies the end of the element opened with elementOpen, corresponding to a closing tag (e.g. </div> in HTML). Any childNodes of the currently open Element that are in the DOM that have not been encountered in the current render pass are removed by the call to elementClose.

#elementVoid Source

elementVoid :: forall e. String -> Maybe String -> Array (Tuple String Foreign) -> Array (Tuple String Foreign) -> Eff (idom :: IDOM | e) HTMLElement

elementVoid tag key staticProperties properties declares a tag Element with optional key, a list of (unchecked) staticProperties and (checked) dynamicProperties at the current location in the document and closes it immediately.

#text Source

text :: forall e. String -> Eff (idom :: IDOM | e) Text

Declares a Text node, with the specified text, should appear at the current location in the document tree.
The bindings do not support formatters at the moment.

#patch Source

patch :: forall e. Node -> Eff (dom :: DOM, idom :: IDOM | e) Unit -> Eff (dom :: DOM | e) Unit

Updates the provided Node with a function containing zero or more calls to elementOpen, text and elementClose. The provided callback function may call other such functions. The patch function may be called with a new Node while a call to patch is already executing.

#currentElement Source

currentElement :: forall e. Eff (idom :: IDOM | e) Node

#currentPointer Source

currentPointer :: forall e. Eff (idom :: IDOM | e) (Maybe Node)

#skip Source

skip :: forall e. Eff (idom :: IDOM | e) Unit

#skipNode Source

skipNode :: forall e. Eff (idom :: IDOM | e) Unit