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

Function getLeafNode

code/communication/public/app.js:6312–6317  ·  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

6310 * @return {DOMElement|DOMTextNode}
6311 */
6312function getLeafNode(node) {
6313 while (node && node.firstChild) {
6314 node = node.firstChild;
6315 }
6316 return node;
6317}
6318
6319/**
6320 * Get the next sibling within a container. This will walk up the

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected