We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE


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

The FocusEvent() constructor returns a newly created FocusEvent object with an optional EventTarget. When a change a focus has a source and a destination, the relatedTarget value must be set to the other target.


var focusEvent = new FocusEvent(typeArg, focusEventInit); 


The FocusEvent() constructor also inherits arguments from UIEvent() and from Event().

Is a DOMString representing the name of the event.
Is a FocusEventInit dictionary, having the following fields:
  • "relatedTarget", optional and defaulting to null, is an EventTarget representing the secondary target of a FocusEvent.

The FocusEventInit dictionary also accepts fields from the UIEventInit and EventInit dictionaries.


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

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) 24.0 (24.0) No support (Yes) (Yes)
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) 24.0 (24.0) No support (Yes) (Yes)

See also


Document Tags and Contributors

 Contributors to this page: teoli, kscarfone
 Last updated by: teoli,