Web/API/Window/event

From Get docs


The read-only Window property event returns the Event which is currently being handled by the site's code. Outside the context of an event handler, the value is always undefined.

You should avoid using this property in new code, and should instead use the Event passed into the event handler function. This property is not universally supported and even when supported introduces potential fragility to your code.

Note: This property can be fragile, in that there may be situations in which the returned Event is not the expected value. In addition, Window.event is not accurate for events dispatched within shadow trees.


Specifications

Specification Status Comment
DOMThe definition of 'Window.event' in that specification. Living Standard Initial definition.

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
event Chrome

Full support 1

Edge

Full support 12

Firefox Full support 66


Full support 66


Full support 63

Notes' Disabled'

Notes' This was briefly enabled by default in 65, then removed again while related compatibility issues are sorted out (see bug 1520756). Disabled' From version 63: this feature is behind the dom.window.event.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

IE

Full support 4

Opera

Full support 7

Safari

Full support 1.1

WebView Android

Full support 1

Chrome Android

Full support 18

Firefox Android Full support 66


Full support 66


Full support 63

Notes' Disabled'

Notes' This was briefly enabled by default in 65, then removed again while related compatibility issues are sorted out (see bug 1520756). Disabled' From version 63: this feature is behind the dom.window.event.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

Opera Android

Full support 10.1

Safari iOS

Full support 1

Samsung Internet Android

Full support 1.0

Legend

Full support  
Full support
See implementation notes.'
See implementation notes.
User must explicitly enable this feature.'
User must explicitly enable this feature.


See also