| 301 | |
| 302 | // remove any empty #text |
| 303 | const cleanup = x => { |
| 304 | for (let i = 0; i < x.children.length; i++) { |
| 305 | const y = x.children[i]; |
| 306 | if (y.tagName === '#text' && y.content === '') { |
| 307 | x.children.splice(i, 1); |
| 308 | i--; |
| 309 | continue; |
| 310 | } |
| 311 | |
| 312 | cleanup(y); |
| 313 | } |
| 314 | }; |
| 315 | cleanup(this.document); |
| 316 | |
| 317 | // add <html> if not there |
nothing calls this directly
no outgoing calls
no test coverage detected