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

Function getSiblingNode

code/composition/public/app.js:6429–6436  ·  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

6427 * @return {?DOMElement|DOMTextNode}
6428 */
6429function getSiblingNode(node) {
6430 while (node) {
6431 if (node.nextSibling) {
6432 return node.nextSibling;
6433 }
6434 node = node.parentNode;
6435 }
6436}
6437
6438/**
6439 * Get object describing the nodes which contain characters at offset.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected