Skip to content

find

Finds the first descendant matching a selector.

Import:

import 'obsidian-test-mocks/setup';

Signature:

function find(this: DocumentFragment, selector: string): HTMLElement | null

Parameters:

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

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