A mutable tree implementation with an API isomorphic to a subset of the DOM.
A mutable tree implementation with an API isomorphic to a subset of the DOM.
(append-child node child)
Adds child
at the end of node
's children and return the added node.
Adds `child` at the end of `node`'s children and return the added node.
(children node)
Return node
's current children.
Return `node`'s current children.
(insert-before node child sibling)
Insert child
before sibling
in node
s children and return the added node.
Insert `child` before `sibling` in `node`s children and return the added node.
(nth-child node i)
Return node
's child in position i
, or nil
if out of bounds.
Return `node`'s child in position `i`, or `nil` if out of bounds.
(parent node)
Return node
's current parent.
Return `node`'s current parent.
(remove-child node child)
Remove child
from node
's children and return the removed node.
Remove `child` from `node`'s children and return the removed node.
(replace-child node child old)
Replace old
by child
in node
's children and return the removed node.
Replace `old` by `child` in `node`'s children and return the removed node.
(set-children node children)
Assign node
s children to children
.
Assign `node`s children to `children`.
(set-index node index)
Assign node
's index to index
.
Assign `node`'s index to `index`.
(set-parent node parent)
Assign node
's parent to parent
.
Assign `node`'s parent to `parent`.
(tree node)
Return a snapshot of the tree rooted at node
.
Return a snapshot of the tree rooted at `node`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close