Element, EventTarget, or CSS selector.
Optionaloptions: FocusOptions<E>Options for setting focus.
Additional options for setting focus to an element.
Optionaldelay?: numberDelay (in milliseconds) to wait until attempting to set focus.
Optionalparent?: TargetParent element (if target is a css!CssSelector).
OptionalpreventScroll?: booleanIf true, don't scroll the focused element into view.
See the MDN documentation for preventScroll
for additional details.
Sets focus to the specified
target. Specify additionaloptionsto refine thefocusoperation.Note that we don't throw if the
targetisnullbecause it may not exist yet if acss!CssSelectoris specified.