MCPcopy
hub / github.com/codeaashu/claude-code / findOwnerChainAtRow

Function findOwnerChainAtRow

src/ink/dom.ts:465–484  ·  view source on GitHub ↗
(root: DOMElement, y: number)

Source from the content-addressed store, hash-verified

463 * undefined and this returns []).
464 */
465export function findOwnerChainAtRow(root: DOMElement, y: number): string[] {
466 let best: string[] = []
467 walk(root, 0)
468 return best
469
470 function walk(node: DOMElement, offsetY: number): void {
471 const yoga = node.yogaNode
472 if (!yoga || yoga.getDisplay() === LayoutDisplay.None) return
473
474 const top = offsetY + yoga.getComputedTop()
475 const height = yoga.getComputedHeight()
476 if (y < top || y >= top + height) return
477
478 if (node.debugOwnerChain) best = node.debugOwnerChain
479
480 for (const child of node.childNodes) {
481 if (isDOMElement(child)) walk(child, top)
482 }
483 }
484}
485

Callers

nothing calls this directly

Calls 1

walkFunction · 0.70

Tested by

no test coverage detected