fn
focusFirst
v0.0.5Attempts to focus the first element from a list of candidates. Stops when focus actually moves.
Signature
ts
declare function focusFirst(candidates: HTMLElement[], { select }?: {
select?: boolean | undefined;
}): boolean;Parameters
| Parameter | Type | Description |
|---|---|---|
candidates | HTMLElement[] | — |
{ select }? | { select?: boolean | undefined; } | — |
Returns
boolean