Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

CheerioAPI

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.

interface CheerioAPI extends StaticType, LoadType {
<T extends Node, S extends string>(
selector?: S | BasicAcceptedElems<T>,
context?: BasicAcceptedElems<Node> | null,
options?: CheerioOptions,
): Cheerio<S extends SelectorType ? Element : T>;
_options: InternalOptions;
_root: Document;
fn: Cheerio.prototype;
}

§Extends

§
StaticType
[src]
§
LoadType
[src]

§Call Signatures

§
<T extends Node, S extends string>(selector?: S | BasicAcceptedElems<T>, context?: BasicAcceptedElems<Node> | null, root?: BasicAcceptedElems<Document>, options?: CheerioOptions): Cheerio<S extends SelectorType ? Element : T>
[src]

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.

@example
$('.apple', '#fruits').text();
//=> Apple

$('ul .pear').attr('class');
//=> pear

$('li[class=orange]').html();
//=> Orange

§Properties

§

The options the document was originally loaded with.

§

The root the document was originally loaded with.

§
fn: Cheerio.prototype
[src]

Mimic jQuery's prototype alias for plugin authors.