| 213 | * Parser callback interface used by the tokenizer. |
| 214 | */ |
| 215 | export interface Handler { |
| 216 | onparserinit(parser: Parser): void; |
| 217 | |
| 218 | /** |
| 219 | * Resets the handler back to starting state |
| 220 | */ |
| 221 | onreset(): void; |
| 222 | |
| 223 | /** |
| 224 | * Signals the handler that parsing is done |
| 225 | */ |
| 226 | onend(): void; |
| 227 | onerror(error: Error): void; |
| 228 | onclosetag(name: string, isImplied: boolean): void; |
| 229 | onopentagname(name: string): void; |
| 230 | /** |
| 231 | * |
| 232 | * @param name Name of the attribute |
| 233 | * @param value Value of the attribute. |
| 234 | * @param quote Quotes used around the attribute. `null` if the attribute has no quotes around the value, `undefined` if the attribute has no value. |
| 235 | */ |
| 236 | onattribute( |
| 237 | name: string, |
| 238 | value: string, |
| 239 | quote?: string | undefined | null, |
| 240 | ): void; |
| 241 | onopentag( |
| 242 | name: string, |
| 243 | attribs: { [s: string]: string }, |
| 244 | isImplied: boolean, |
| 245 | ): void; |
| 246 | ontext(data: string): void; |
| 247 | oncomment(data: string): void; |
| 248 | oncdatastart(): void; |
| 249 | oncdataend(): void; |
| 250 | oncommentend(): void; |
| 251 | onprocessinginstruction(name: string, data: string): void; |
| 252 | } |
| 253 | |
| 254 | const reNameEnd = /\s|\//; |
| 255 |
no outgoing calls
no test coverage detected
searching dependent graphs…