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

Function getSiblingNode

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

6324 * @return {?DOMElement|DOMTextNode}
6325 */
6326function getSiblingNode(node) {
6327 while (node) {
6328 if (node.nextSibling) {
6329 return node.nextSibling;
6330 }
6331 node = node.parentNode;
6332 }
6333}
6334
6335/**
6336 * Get object describing the nodes which contain characters at offset.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected