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

Function getSiblingNode

code/new-context-api/public/app.js:5652–5659  ·  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

5650 * @return {?DOMElement|DOMTextNode}
5651 */
5652function getSiblingNode(node) {
5653 while (node) {
5654 if (node.nextSibling) {
5655 return node.nextSibling;
5656 }
5657 node = node.parentNode;
5658 }
5659}
5660
5661/**
5662 * Get object describing the nodes which contain characters at offset.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected