Liking cljdoc? Tell your friends :D

apsara.vdom


add-node!cljs

(add-node! parent-id node)
(add-node! parent-id node right-sibling-id)
source

annotate-nodecljs

(annotate-node node parent-id)
source

attrcljs

(attr node)
source

attr?cljs

(attr? node)
source

cache-it!cljs

(cache-it! node)
source

childrencljs

(children node)
source

children?cljs

(children? node)
source

delete-char-at!cljs

(delete-char-at! id offset)
source

enclose!cljs

(enclose! id enclosing-node)
source

fork!cljs

(fork! id nlist)
source

id-countercljs

source

index-ofcljs

(index-of node)
source

insert-char-at!cljs

(insert-char-at! id c offset)
source

last-child?cljs

(last-child? node)
source

leaf?cljs

(leaf? node)
source

left-ofcljs

(left-of id)
source

leftmost-child-ofcljs

(leftmost-child-of id)
source

mod-str!cljs

(mod-str! node str)
source

new-idcljs

(new-id)
(new-id old-id)
source

new-speccljs

(new-spec)
source

node-from-idcljs

(node-from-id id)
source

node-lookupcljs

To speed up random access to the tree we have this lookup table. The flow is like so:

  1. User clicks on a dom node on which we have registered a mouse-click event handler.
  2. The browser would have changed the cursor position which we get by calling the getSelection API. We store the selection in cursor/selection.
  3. When the next key is pressed we get the DOM node's id which we independently track in our hiccup data structure.
To speed up random access to the tree we have this lookup
table. The flow is like so:
1. User clicks on a dom node on which we have registered a
   mouse-click event handler.
2. The browser would have changed the cursor position which
   we get by calling the getSelection API. We store the
   selection in cursor/selection.
3. When the next key is pressed we get the DOM node's id
   which we independently track in our hiccup data structure.
sourceraw docstring

nth-childcljs

(nth-child node n)
source

on-spec-changecljs

(on-spec-change key reference old new)
source

parent-ofcljs

(parent-of node)
source

picljidcljs

(picljid node)
source

remove-node!cljs

(remove-node! id)
source

replace-node!cljs

(replace-node! id new-node)
source

reset-id-counter!cljs

(reset-id-counter!)
source

reset-spec!cljs

(reset-spec!)
source

right-ofcljs

(right-of id)
source

right-siblingcljs

(right-sibling id)
source

rightmost-child-ofcljs

(rightmost-child-of id)
source

ROOT-IDcljs

source

root?cljs

(root? node)
source

shell-out!cljs

(shell-out! id)
source

siblingscljs

(siblings node)
source

speccljs

The spec is our data structure to maintain editor state. spec is specified in hiccup. Note: Why we don't use zippers Zippers are neat. But they don't have a way to jump to a random node in the tree. We need to jump to a random node when the user clicks on a corresponding DOM element. For these cases, using zippers, we would have to search the tree for the given element, an O(log n) operation.

The spec is our data structure to maintain editor state.
spec is specified in hiccup.
Note: Why we don't use zippers
Zippers are neat. But they don't have a way to jump to
a random node in the tree. We need to jump to a random
node when the user clicks on a corresponding DOM element.
For these cases, using zippers, we would have to search
the tree for the given element, an O(log n) operation.
sourceraw docstring

spec-listcljs

source

spec-ofcljs

(spec-of node)
source

split-subtree-atcljs

(split-subtree-at id offset)
source

strlencljs

(strlen id)
source

substitute!cljs

(substitute! id nlist)
source

tagcljs

(tag node)
source

to-stringcljs

(to-string id)
source

transplant!cljs

(transplant! nlist new-parent-id)
source

uncache-it!cljs

(uncache-it! node)
source

walkcljs

(walk id func)
source

with-attrcljs

(with-attr node nattr)
source

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

× close