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

x/html_parser/src/mod.ts>DomHandlerOptions

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

Properties

optional
withStartIndices: boolean

Add a startIndex property to nodes. When the parser is used in a non-streaming fashion, startIndex is an integer indicating the position of the start of the node in the document.

optional
withEndIndices: boolean

Add an endIndex property to nodes. When the parser is used in a non-streaming fashion, endIndex is an integer indicating the position of the end of the node in the document.

optional
deprecated
normalizeWhitespace: boolean

Replace all whitespace with single spaces.

Note: Enabling this might break your markup.

optional
xmlMode: boolean

Treat the markup as XML.