FocusEvent

The FocusEvent interface represents focus-related events, including focus, blur, focusin, and focusout.

Constructor

FocusEvent()
Creates a FocusEvent event with the given parameters.

Properties

This interface also inherits properties from its parent UIEvent, and indirectly from Event.

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

Methods

This interface has no specific methods. It inherits methods from its parent UIEvent, and indirectly from Event.

Specifications

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

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
FocusEvent
Experimental
Chrome Full support YesEdge Full support 12Firefox Full support 24IE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 24Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
FocusEvent() constructor
Experimental
Chrome Full support YesEdge Full support ≤18Firefox Full support 24IE No support NoOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 24Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
relatedTarget
Experimental
Chrome Full support YesEdge Full support 12Firefox Full support 48IE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 48Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.

See also

  • The Event base interface