Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/cheerio/mod.ts>cheerio.CheerioAPI

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

A querying function, bound to a document created from the provided markup.

Also provides several helper methods for dealing with the document as a whole.

Call Signatures

<T extends AnyNode, S extends string>(
selector?: S | BasicAcceptedElems<T>,
context?: BasicAcceptedElems<AnyNode> | null,
options?: CheerioOptions,
): Cheerio<S extends SelectorType ? Element : T>

This selector method is the starting point for traversing and manipulating the document. Like jQuery, it's the primary method for selecting elements in the document.

selector searches within the context scope which searches within the root scope.

Properties

_root: Document

The root the document was originally loaded with.

_options: InternalOptions

The options the document was originally loaded with.

fn: Cheerio.prototype

Mimic jQuery's prototype alias for plugin authors.

load: ReturnType<getLoad>