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

Function walkTree

src/ink/focus.ts:140–151  ·  view source on GitHub ↗
(node: DOMElement, result: DOMElement[])

Source from the content-addressed store, hash-verified

138}
139
140function walkTree(node: DOMElement, result: DOMElement[]): void {
141 const tabIndex = node.attributes['tabIndex']
142 if (typeof tabIndex === 'number' && tabIndex >= 0) {
143 result.push(node)
144 }
145
146 for (const child of node.childNodes) {
147 if (child.nodeName !== '#text') {
148 walkTree(child, result)
149 }
150 }
151}
152
153function isInTree(node: DOMElement, root: DOMElement): boolean {
154 let current: DOMElement | undefined = node

Callers 1

collectTabbableFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected