This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The FocusEvent interface represents focus-related events like focus, blur, focusin, or focusout.


Creates a FocusEvent event with the given parameters.


Inherits properties from its parent UIEvent, and indirectly from Event.

FocusEvent.relatedTarget Read only
Is an EventTarget representing a secondary target for this event. As in some cases (like when tabbing in or out a page), this property may be set to null for security reasons.


No specific method; inherits methods from its parent UIEvent, and indirectly from Event.


Specification Status Comment
Document Object Model (DOM) Level 3 Events Specification
The definition of 'FocusEvent' in that specification.
Obsolete Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes Yes249 Yes Yes
FocusEvent() constructor Yes Yes24 No Yes Yes
relatedTarget Yes Yes489 Yes Yes
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes Yes Yes24 Yes Yes ?
FocusEvent() constructor Yes Yes Yes24 Yes Yes ?
relatedTarget Yes Yes Yes48 Yes Yes ?

See also

  • The Event base interface.

Document Tags and Contributors

Contributors to this page: fscholz, danielnixon, erikadoyle, teoli, kscarfone
Last updated by: fscholz,