MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getRootNode

Function getRootNode

src/ink/focus.ts:166–173  ·  view source on GitHub ↗
(node: DOMElement)

Source from the content-addressed store, hash-verified

164 * the FocusManager — like browser's `node.getRootNode()`.
165 */
166export function getRootNode(node: DOMElement): DOMElement {
167 let current: DOMElement | undefined = node
168 while (current) {
169 if (current.focusManager) return current
170 current = current.parentNode
171 }
172 throw new Error('Node is not in a tree with a FocusManager')
173}
174
175/**
176 * Walk up to root and return its FocusManager.

Callers 2

getFocusManagerFunction · 0.85
removeChildFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected