Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
interface DomSerializerOptions
import { type DomSerializerOptions } from "https://deno.land/x/html_parser@v0.1.3/src/DomSerializer.ts";

Properties

optional
emptyAttrs: boolean

Print an empty attribute's value.

optional
selfClosingTags: boolean

Print self-closing tags for tags without contents.

optional
xmlMode: boolean | "foreign"

Treat the input as an XML document; enables the emptyAttrs and selfClosingTags options.

If the value is "foreign", it will try to correct mixed-case attribute names.

optional
decodeEntities: boolean

Encode characters that are either reserved in HTML or XML, or are outside of the ASCII range.