The FocusEvent() constructor returns a newly created FocusEvent object with an optional EventTarget. When the event has both a source and a destination, the relatedTarget value must be set to the other target.
new FocusEvent(type)
new FocusEvent(type, options)The FocusEvent() constructor also inherits arguments from UIEvent() and from Event().
typeA string with the name of the event. It is case-sensitive and browsers set it to blur, focus, focusin, or focusout.
options OptionalAn object that, in addition of the properties defined in UIEvent(), can have the following properties:
An EventTarget representing the secondary target of a FocusEvent. It defaults to null.
FocusEvent interface it belongs to.