MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / getLeafNode

Function getLeafNode

code/third-party/public/app.js:5510–5515  ·  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

5508 * @return {DOMElement|DOMTextNode}
5509 */
5510function getLeafNode(node) {
5511 while (node && node.firstChild) {
5512 node = node.firstChild;
5513 }
5514 return node;
5515}
5516
5517/**
5518 * Get the next sibling within a container. This will walk up the

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected