@public @param {string} buffer
(buffer)
| 20 | |
| 21 | /**@public @param {string} buffer*/ |
| 22 | parse(buffer) { |
| 23 | /**@type {Element[]} */ |
| 24 | this.nodeStack = [this.root]; |
| 25 | this.tokenizer.consume(buffer); |
| 26 | |
| 27 | const htmlElements = { type: "root", children: this.root.children }; |
| 28 | this.root = { type: "root", children: [] }; |
| 29 | return htmlElements; |
| 30 | } |
| 31 | |
| 32 | /** @param {Element|Text} element*/ |
| 33 | addChildElement(element) { |
no test coverage detected