Nasi wolontariusze nie przetłumaczyli jeszcze tego artykułu na język Polski. Dołącz do nas i pomóż go przetłumaczyć!
Można także przeczytać artykuł w języku: English (US).

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
DOM
The definition of 'Window.event' in that specification.
Living Standard Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
eventChrome Full support YesEdge Full support 12Firefox Full support 63
Notes Disabled
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 YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 63
Notes Disabled
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 YesSafari iOS Full support YesSamsung Internet Android Full support Yes

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

Autorzy i etykiety dokumentu

Ostatnia aktualizacja: mdnwebdocs-bot,