FocusEvent: FocusEvent() constructor - Web APIs | MDN
Syntax
js
new FocusEvent(type)
new FocusEvent(type, options)
Parameters
The FocusEvent() constructor also inherits arguments from
UIEvent() and from Event().
type-
A string with the name of the event. It is case-sensitive and browsers set it to
blur,focus,focusin, orfocusout. optionsOptional-
An object that, in addition of the properties defined in
UIEvent(), can have the following properties:-
An
EventTargetrepresenting the secondary target of aFocusEvent. It defaults tonull.
-
Specifications
| Specification |
|---|
| UI Events # dom-focusevent-focusevent |
Browser compatibility
See also
- The
FocusEventinterface it belongs to.