Remove text nodes wrongly appended at container root during earlier frames
(container: HTMLElement)
| 254 | |
| 255 | /** Remove text nodes wrongly appended at container root during earlier frames */ |
| 256 | function removeOrphanContainerText(container: HTMLElement): void { |
| 257 | for (const node of [...container.childNodes]) { |
| 258 | if (node.nodeType === Node.TEXT_NODE) { |
| 259 | node.remove(); |
| 260 | } |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | /** Strip streaming caret marker from HTML */ |
| 265 | export function stripCaret(html: string): string { |
no outgoing calls
no test coverage detected