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

Function getLeafNode

code/styling/public/app.js:6277–6282  ·  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

6275 * @return {DOMElement|DOMTextNode}
6276 */
6277function getLeafNode(node) {
6278 while (node && node.firstChild) {
6279 node = node.firstChild;
6280 }
6281 return node;
6282}
6283
6284/**
6285 * Get the next sibling within a container. This will walk up the

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected