(source: string)
| 81 | } |
| 82 | |
| 83 | export function parseHtml(source: string): SplootNode { |
| 84 | const parser = new DOMParser() |
| 85 | const splootNode = new SplootHtmlDocument(null) |
| 86 | const htmlDoc = parser.parseFromString(source, 'text/html') |
| 87 | |
| 88 | htmlDoc.childNodes.forEach((childNode: ChildNode) => { |
| 89 | const newNode = createNodeFromDomNode(childNode) |
| 90 | if (newNode !== null) { |
| 91 | splootNode.getBody().addChild(newNode) |
| 92 | } |
| 93 | }) |
| 94 | |
| 95 | return splootNode |
| 96 | } |
nothing calls this directly
no test coverage detected