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