Window 객체의 event 읽기전용 속성은 웹사이트의 코드가 현재 처리 중인 Event를 반환합니다. 이벤트 처리기 바깥에서는 항상 undefined입니다.

되도록이면 신규 코드에서는 사용하지 않아야 하고, 되도록 처리기가 매개변수로 받는 Event를 사용해야 합니다. event 속성은 많이 지원되지도 않고, 지원하는 환경에서도 나중에 문제가 발생할 여지를 키웁니다.

참고: event 속성이 반환하는 Event가 예상하는 값과 다른 경우가 많습니다. 게다가 섀도우 트리 안에서 발생한 이벤트의 경우 정확하지 않습니다.

명세

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

브라우저 호환성

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox 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 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.

같이 보기

문서 태그 및 공헌자

이 페이지의 공헌자: alattalatta, mdnwebdocs-bot, JCORP
최종 변경자: alattalatta,