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

Function getLeafNode

code/dependency-injection/public/app.js:6370–6375  ·  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

6368 * @return {DOMElement|DOMTextNode}
6369 */
6370function getLeafNode(node) {
6371 while (node && node.firstChild) {
6372 node = node.firstChild;
6373 }
6374 return node;
6375}
6376
6377/**
6378 * Get the next sibling within a container. This will walk up the

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected