* Resets the parser to a blank state, ready to parse a new HTML document
()
| 710 | * Resets the parser to a blank state, ready to parse a new HTML document |
| 711 | */ |
| 712 | reset(): void { |
| 713 | this.cbs.onreset?.(); |
| 714 | this.tokenizer.reset(); |
| 715 | this.tagname = ""; |
| 716 | this.attribname = ""; |
| 717 | this.attribvalue = ""; |
| 718 | this.attribs = null; |
| 719 | this.stack.length = 0; |
| 720 | this.startIndex = 0; |
| 721 | this.endIndex = 0; |
| 722 | this.cbs.onparserinit?.(this); |
| 723 | this.buffers.length = 0; |
| 724 | this.foreignContext.length = 0; |
| 725 | this.foreignContext.unshift(ForeignContext.None); |
| 726 | this.bufferOffset = 0; |
| 727 | this.writeIndex = 0; |
| 728 | this.ended = false; |
| 729 | } |
| 730 | |
| 731 | /** |
| 732 | * Resets the parser, then parses a complete document and |
no test coverage detected