(element: Element)
| 341 | // support ShadowRoot (every browser we support), falling back to the flat-DOM |
| 342 | // path otherwise. (dom.js lines 1026-1035) |
| 343 | function getText(element: Element): string { |
| 344 | const lines: string[] = [] |
| 345 | if (typeof ShadowRoot === 'function') { |
| 346 | appendTextFromElementInComposedDom(element, lines) |
| 347 | } else { |
| 348 | appendTextFromElement(element, lines) |
| 349 | } |
| 350 | return concatenateCleanedLines(lines) |
| 351 | } |
| 352 | |
| 353 | export default getText |
nothing calls this directly
no test coverage detected