The nodes of templates, and the attributes and text of their parts.
The nodes of templates, and the attributes and text of their parts.
(make-node! fixed)Makes one detached HTML element from the template fixed.
Throws when the template is not fixed, as template/fixed? defines it.
Makes one detached HTML element from the template `fixed`. Throws when the template is not fixed, as `template/fixed?` defines it.
(part node)The part name of node and the node, when it is a part.
The part name of `node` and the node, when it is a part.
(read-parts node)The parts of node by name: node itself and the parts below it.
A keyed node below node is left out with everything in it.
The parts of `node` by name: `node` itself and the parts below it. A keyed node below `node` is left out with everything in it.
The symbol under which an element offers the hold of its render.
The symbol under which an element offers the hold of its render.
(set-attrs! el attrs)Brings the attributes that attrs names to their values, where they differ: true sets an empty
attribute, false and nil remove it, a keyword gives its name. attrs is a map or a sequence
of pairs, written in its order.
Brings the attributes that `attrs` names to their values, where they differ: true sets an empty attribute, false and nil remove it, a keyword gives its name. `attrs` is a map or a sequence of pairs, written in its order.
(set-text! el text)Makes text the whole content of el, and writes only where it differs.
Makes `text` the whole content of `el`, and writes only where it differs.
(with-one-render! el f)Calls f with el while el holds its attribute changes, when it offers that.
Calls `f` with `el` while `el` holds its attribute changes, when it offers that.
(write-parts! parts writes)Applies writes to parts, which are maps by part name: the nodes as read-parts gives
them, and :text and :attrs as template/writes gives them.
Throws before any write when a part name has no node.
Applies `writes` to `parts`, which are maps by part name: the nodes as `read-parts` gives them, and `:text` and `:attrs` as `template/writes` gives them. Throws before any write when a part name has no node.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |