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

Function getLeafNode

code/redux/public/app.js:6528–6533  ·  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

6526 * @return {DOMElement|DOMTextNode}
6527 */
6528function getLeafNode(node) {
6529 while (node && node.firstChild) {
6530 node = node.firstChild;
6531 }
6532 return node;
6533}
6534
6535/**
6536 * Get the next sibling within a container. This will walk up the

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected