web api interface
FocusEvent
The FocusEvent interface represents focus-related events, including focus, blur, focusin, and focusout.
Constructor
FocusEvent()- : Creates a
FocusEventevent with the given parameters.
- : Creates a
Instance properties
This interface also inherits properties from its parent UIEvent, and indirectly from Event.
relatedTarget- : An
EventTargetrepresenting a secondary target for this event. In some cases (such as when tabbing in or out a page), this property may be set tonullfor security reasons.
- : An
Instance methods
This interface has no specific methods. It inherits methods from its parent UIEvent, and indirectly from Event.
Order of events
When focus is shifted from element A to element B, focus events are dispatched in the following order:
blur: sent after element A loses focus.focusout: sent after theblurevent.focus: sent after element B receives focus.focusin: sent after thefocusevent.
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.
See also
- The
Eventbase interface