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

DomUtils.findOne

Finds one element in a tree that passes a test.

function findOne(
test: (elem: Element) => boolean,
nodes: Node[],
recurse?: boolean,
): Element | null;
§
findOne(test: (elem: Element) => boolean, nodes: Node[], recurse?: boolean): Element | null
[src]

§Parameters

§
test: (elem: Element) => boolean
[src]

Function to test nodes on.

§
nodes: Node[]
[src]

Array of nodes to search.

§
recurse?: boolean optional
[src]

Also consider child nodes.

§Return Type

§

The first child node that passes test.