Skip to main content

Function: contains()

contains(container, contained): boolean

Checks to see if the contained DOM element is a descendant of the container DOM element.

Parameters

container: AnyNode

Potential parent node.

contained: AnyNode

Potential child node.

Returns

boolean

Indicates if the nodes contain one another.

Alias

Cheerio.contains

See

https://api.jquery.com/jQuery.contains/

Defined in

src/static.ts:218