fn
focus
v0.0.5Focuses an element without scrolling. Optionally calls select on input elements.
Signature
ts
declare function focus(element?: FocusableTarget | null, { select }?: {
select?: boolean | undefined;
}): void;Parameters
| Parameter | Type | Description |
|---|---|---|
element? | FocusableTarget | null | — |
{ select }? | { select?: boolean | undefined; } | — |