MCPcopy Create free account
hub / github.com/microsoft/SandDance / getLeafNode

Function getLeafNode

docs/external/js/react-dom.development.js:6785–6791  ·  view source on GitHub ↗

* Given any node return the first leaf node without children. * * @param {DOMElement|DOMTextNode} node * @return {DOMElement|DOMTextNode}

(node)

Source from the content-addressed store, hash-verified

6783 */
6784
6785 function getLeafNode(node) {
6786 while (node && node.firstChild) {
6787 node = node.firstChild;
6788 }
6789
6790 return node;
6791 }
6792 /**
6793 * Get the next sibling within a container. This will walk up the
6794 * DOM if a node's siblings have been exhausted.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected