MCPcopy Index your code
hub / github.com/bugy/script-server / getComplexNodeText

Function getComplexNodeText

web-src/tests/unit/terminal_view_test.js:66–76  ·  view source on GitHub ↗
(complexNode)

Source from the content-addressed store, hash-verified

64 }
65
66 function getComplexNodeText(complexNode) {
67 const firstChild = complexNode.childNodes[0];
68 if (firstChild.nodeType === 1) {
69 if (firstChild.tagName !== 'A') {
70 throw Error('Unsupported child ' + firstChild);
71 }
72 return firstChild.innerText;
73 }
74
75 return getTextNodeText(firstChild);
76 }
77
78 function getText(element) {
79 if (element.nodeType === 3) {

Callers 2

getTextFunction · 0.85
assertStyledNodeFunction · 0.85

Calls 1

getTextNodeTextFunction · 0.85

Tested by

no test coverage detected