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

Function getSiblingNode

code/third-party/public/app.js:5524–5531  ·  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

5522 * @return {?DOMElement|DOMTextNode}
5523 */
5524function getSiblingNode(node) {
5525 while (node) {
5526 if (node.nextSibling) {
5527 return node.nextSibling;
5528 }
5529 node = node.parentNode;
5530 }
5531}
5532
5533/**
5534 * Get object describing the nodes which contain characters at offset.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected