Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/html_parser/src/Parser.ts>Handler

Port of fb55/htmlparser2 for Deno
Latest
interface Handler
import { type Handler } from "https://deno.land/x/html_parser@v0.1.3/src/Parser.ts";

Methods

onparserinit(parser: Parser): void
onreset(): void

Resets the handler back to starting state

onend(): void

Signals the handler that parsing is done

onerror(error: Error): void
onclosetag(name: string): void
onopentagname(name: string): void
onattribute(
name: string,
value: string,
quote?: string | undefined | null,
): void
onopentag(name: string, attribs: { [s: string]: string; }): void
ontext(data: string): void
oncomment(data: string): void
oncdatastart(): void
oncdataend(): void
oncommentend(): void
onprocessinginstruction(name: string, data: string): void