(complexNode)
| 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) { |
no test coverage detected