Skip to content

find

Finds the first descendant matching a selector.

Import:

import 'obsidian-test-mocks/setup';

Signature:

function find(this: Element, selector: string): Element | null

Parameters:

Parameter Type Description
this Element
selector string The CSS selector to match.

Returns: Element | null — The first matching element, or null when nothing matches.