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

x/html_parser/src/mod.ts>createDomStream

Port of fb55/htmlparser2 for Deno
Latest
function createDomStream
import { createDomStream } from "https://deno.land/x/html_parser@v0.1.3/src/mod.ts";

Creates a parser instance, with an attached DOM handler.

Parameters

cb: (error: Error | null, dom: Node[]) => void

A callback that will be called once parsing has been completed.

optional
options: Options

Optional options for the parser and DOM builder.

optional
elementCb: (element: Element) => void

An optional callback that will be called every time a tag has been completed inside of the DOM.