Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/cheerio/mod.ts>cheerio.CheerioOptions

Cheerio port to Deno with typings
Latest
interface cheerio.CheerioOptions
import { type cheerio } from "https://deno.land/x/cheerio@1.0.7/mod.ts";
const { CheerioOptions } = cheerio;

Options accepted by Cheerio.

Please note that parser-specific options are only recognized if the relevant parser is used.

Properties

optional
xml: HTMLParser2Options | boolean

Recommended way of configuring htmlparser2 when wanting to parse XML.

optional
baseURI: string | URL

The base URI for the document. Used for the href and src props.

optional
quirksMode: SelectOptions["quirksMode"]

Is the document in quirks mode?

This will lead to .className and #id being case-insensitive.

optional
pseudos: SelectOptions["pseudos"]

Extension point for pseudo-classes.

Maps from names to either strings of functions.

  • A string value is a selector that the element must match to be selected.
  • A function is called with the element as its first argument, and optional parameters second. If it returns true, the element is selected.