MCPcopy Create free account
hub / github.com/dwachss/bililiteRange / nextnode

Function nextnode

bililiteRange.js:513–526  ·  view source on GitHub ↗
(node, root)

Source from the content-addressed store, hash-verified

511
512// W3C internals
513function nextnode (node, root){
514 // in-order traversal
515 // we've already visited node, so get kids then siblings
516 if (node.firstChild) return node.firstChild;
517 if (node.nextSibling) return node.nextSibling;
518 if (node===root) return null;
519 while (node.parentNode){
520 // get uncles
521 node = node.parentNode;
522 if (node == root) return null;
523 if (node.nextSibling) return node.nextSibling;
524 }
525 return null;
526}
527function w3cmoveBoundary (rng, n, bStart, el){
528 // move the boundary (bStart == true ? start : end) n characters forward, up to the end of element el. Forward only!
529 // if the start is moved after the end, then an exception is raised

Callers 1

w3cmoveBoundaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected