Event Object Reference

Interfaces, Properties and Methods

Core members of the Event interface
Member of Event Meaning
type, timeStamp Event name; creation time in ms
target, currentTarget Origin element; element now handling it
eventPhase 1 capture, 2 at target, 3 bubble
bubbles, cancelable, composed Flags set when the event was created
defaultPrevented, isTrusted Canceled? Fired by the browser?
preventDefault(), stopPropagation() See Preventing Default Behaviour and Stopping Event Propagation

Subclasses add data: MouseEvent has clientX/clientY and button, PointerEvent adds pointerType, KeyboardEvent has key and code, SubmitEvent has submitter, CustomEvent has detail. Avoid the legacy aliases srcElement, returnValue and cancelBubble.