MCPcopy Index your code
hub / github.com/fb55/htmlparser2 / Handler

Interface Handler

src/Parser.ts:215–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213 * Parser callback interface used by the tokenizer.
214 */
215export 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
254const reNameEnd = /\s|\//;
255

Callers 26

constructorMethod · 0.80
resetMethod · 0.80
resetMethod · 0.80
onendMethod · 0.65
writeMethod · 0.80
endMethod · 0.80
endOpenTagMethod · 0.65
onclosetagMethod · 0.65
popElementMethod · 0.65
onendMethod · 0.65
emitOpenTagMethod · 0.65
onclosetagMethod · 0.65

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…