MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / hasInteractiveDescendant

Function hasInteractiveDescendant

lib/html.js:119–129  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

117 }
118
119 function hasInteractiveDescendant(node) {
120 if (!node.childNodes) return false
121 let result = false
122
123 for (const childNode of node.childNodes) {
124 if (isInteractive(childNode) || hasMeaningfulText(childNode)) return true
125 result = result || hasInteractiveDescendant(childNode)
126 }
127
128 return result
129 }
130
131 // Function to remove non-interactive elements recursively
132 function removeNonInteractive(node) {

Callers 1

removeNonInteractiveFunction · 0.85

Calls 2

isInteractiveFunction · 0.85
hasMeaningfulTextFunction · 0.85

Tested by

no test coverage detected