vtils

Home > utils > selectElement

selectElement() function

Signature:

export declare function selectElement<Selector extends string, TElement extends Element = ParseSelector<Selector, HTMLElement>>(selectors: Selector | Selector[], baseElement?: ParentNode): TElement | undefined;

Parameters

Parameter Type Description
selectors Selector | Selector[] One or more CSS selectors separated by commas
baseElement ParentNode (Optional) The element to look inside of The element found, if any

Returns:

TElement | undefined