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

Function getSiblingNode

code/redux/public/app.js:6542–6549  ·  view source on GitHub ↗

* Get the next sibling within a container. This will walk up the * DOM if a node's siblings have been exhausted. * * @param {DOMElement|DOMTextNode} node * @return {?DOMElement|DOMTextNode}

(node)

Source from the content-addressed store, hash-verified

6540 * @return {?DOMElement|DOMTextNode}
6541 */
6542function getSiblingNode(node) {
6543 while (node) {
6544 if (node.nextSibling) {
6545 return node.nextSibling;
6546 }
6547 node = node.parentNode;
6548 }
6549}
6550
6551/**
6552 * Get object describing the nodes which contain characters at offset.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected