Home > @findkit/ui > select
select() function
Run the given CSS selector after the DOMContentLoaded event and filter the results to given instance type. Does not invoke the callback if no elements where matched.
The callback is invoked immediately when the DOMContentLoaded event has already fired.
Signature:
export declare function select<InstanceFilter extends typeof Element>(selector: ElementSelector<InstanceType<InstanceFilter>>, instanceFilter: InstanceFilter, cb: SelectCallback<InstanceType<InstanceFilter>>): void;
Parameters
Parameter | Type | Description |
---|---|---|
selector | ElementSelector<InstanceType<InstanceFilter>> | CSS Selector |
instanceFilter | InstanceFilter | Filter results to only include instances of the given implementation |
cb | SelectCallback<InstanceType<InstanceFilter>> |
Returns:
void