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

Function getSiblingNode

code/styling/public/app.js:6291–6298  ·  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

6289 * @return {?DOMElement|DOMTextNode}
6290 */
6291function getSiblingNode(node) {
6292 while (node) {
6293 if (node.nextSibling) {
6294 return node.nextSibling;
6295 }
6296 node = node.parentNode;
6297 }
6298}
6299
6300/**
6301 * Get object describing the nodes which contain characters at offset.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected