The Event
interface represents any event which takes place in the DOM; some are user-generated (such as mouse or keyboard events), while others are generated by APIs (such as events that indicate an animation has finished running, a video has been paused, and so forth). There are many types of event, some of which use are other interfaces based on the main Event
interface. Event
itself contains the properties and methods which are common to all events.
Event
Below is a list of interfaces which are based on the main Event
interface, with links to their respective documentation in the MDN API reference. Note that all event interfaces have names which end in "Event".
AnimationEvent
AudioProcessingEvent
BeforeInputEvent
BeforeUnloadEvent
BlobEvent
ClipboardEvent
CloseEvent
CompositionEvent
CSSFontFaceLoadEvent
CustomEvent
DeviceLightEvent
DeviceMotionEvent
DeviceOrientationEvent
DeviceProximityEvent
DOMTransactionEvent
DragEvent
EditingBeforeInputEvent
ErrorEvent
FetchEvent
FocusEvent
GamepadEvent
HashChangeEvent
IDBVersionChangeEvent
InputEvent
KeyboardEvent
MediaStreamEvent
MessageEvent
MouseEvent
MutationEvent
OfflineAudioCompletionEvent
PageTransitionEvent
PointerEvent
PopStateEvent
ProgressEvent
RelatedEvent
RTCDataChannelEvent
RTCIdentityErrorEvent
RTCIdentityEvent
RTCPeerConnectionIceEvent
SensorEvent
StorageEvent
SVGEvent
SVGZoomEvent
TimeEvent
TouchEvent
TrackEvent
TransitionEvent
UIEvent
UserProximityEvent
WebGLContextEvent
WheelEvent
Event()
Event
object, returning it to the caller.Event.bubbles
Read only
Event.cancelBubble
Event.stopPropagation()
. Setting its value to true
before returning from an event handler prevents propagation of the event.Event.cancelable
Read only
Event.composed
Read only
Event.currentTarget
Read only
Event.deepPath
Array
of DOM Node
s through which the event has bubbled.Event.defaultPrevented
Read only
event.preventDefault()
has been called on the event.Event.eventPhase
Read only
Event.explicitOriginalTarget
Read only
Event.originalTarget
Read only
Event.returnValue
Event.preventDefault()
and Event.defaultPrevented
.Event.scoped
Read only
Boolean
indicating whether the given event will bubble across through the shadow root into the standard DOM. This property has been renamed to composed
.Event.srcElement
Event.target
.Event.target
Read only
Event.timeStamp
Read only
DOMHighResTimeStamp
instead.Event.type
Read only
Event.isTrusted
Read only
Event.initEvent()
Event.preventBubble()
Obsolete since Gecko 24
event.stopPropagation
instead.Event.preventCapture()
Obsolete since Gecko 24
event.stopPropagation
instead.Event.preventDefault()
Event.stopImmediatePropagation()
Event.stopPropagation()
Event.getPreventDefault()
Event.defaultPrevented
. Use Event.defaultPrevented
instead.
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Event