@microsoft/fast-element > elements

elements() function

Creates a function that can be used to filter a Node array, selecting only elements.

Signature:
export declare function elements(selector?: string): (value: Node, index: number, array: Node[]) => boolean;

Parameters

ParameterTypeDescription
selectorstringAn optional selector to restrict the filter to.
Returns:

(value: Node, index: number, array: Node[]) => boolean