Liking cljdoc? Tell your friends :D

hyperfiddle.domlike

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.
raw docstring

append-childclj

(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.
sourceraw docstring

childrenclj

(children node)

Return node's current children.

Return `node`'s current children.
sourceraw docstring

indexclj

(index node)

Return node's current index.

Return `node`'s current index.
sourceraw docstring

insert-beforeclj

(insert-before node child sibling)

Insert child before sibling in nodes children and return the added node.

Insert `child` before `sibling` in `node`s children and return the added node.
sourceraw docstring

nodeclj

(node)

Return a fresh node.

Return a fresh node.
sourceraw docstring

nth-childclj

(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.
sourceraw docstring

parentclj

(parent node)

Return node's current parent.

Return `node`'s current parent.
sourceraw docstring

remove-atclj

(remove-at node i)
source

remove-childclj

(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.
sourceraw docstring

replace-childclj

(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.
sourceraw docstring

set-childrenclj

(set-children node children)

Assign nodes children to children.

Assign `node`s children to `children`.
sourceraw docstring

set-indexclj

(set-index node index)

Assign node's index to index.

Assign `node`'s index to `index`.
sourceraw docstring

set-parentclj

(set-parent node parent)

Assign node's parent to parent.

Assign `node`'s parent to `parent`.
sourceraw docstring

treeclj

(tree node)

Return a snapshot of the tree rooted at node.

Return a snapshot of the tree rooted at `node`.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close