Event Interface
This chapter describes the DOM Event Model. The Event interface itself is described, as well as the interfaces for event registration on nodes in the DOM, and event listeners, and several longer examples that show how the various event interfaces relate to one another.
There is an excellent diagram that clearly explains the three phases of event flow through the DOM in the DOM Level 3 Events draft.
Subinterfaces
AnimationEvent, AudioProcessingEvent, BeforeLoadEvent, CloseEvent, CustomEvent, DeviceMotionEvent, DeviceOrientationEvent, ErrorEvent, HashChangeEvent, IDBVersionChangeEvent, MediaKeyEvent, MediaStreamEvent, MediaStreamTrackEvent, MessageEvent, MutationEvent, OfflineAudioCompletionEvent, OverflowEvent, PageTransitionEvent, PopStateEvent, ProgressEvent, SpeechInputEvent, SpeechRecognitionError, SpeechRecognitionEvent, StorageEvent, TrackEvent, TransitionEvent, UIEvent, WebGLContextEvent
Constructors
Code new Event(String type, [bool canBubble, bool cancelable]) #
Event(String type, [bool canBubble, bool cancelable]);
Static Fields
Methods
Code void preventDefault() #
void preventDefault();
Code void stopImmediatePropagation() #
void stopImmediatePropagation();
Code void stopPropagation() #
void stopPropagation();
Code void $dom_initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg) #
DocumentEvent
interface.
void $dom_initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg);
Fields
Code final bool bubbles #
final bool bubbles;
Code bool cancelBubble #
bool cancelBubble;
Code final bool cancelable #
final bool cancelable;
Code final EventTarget currentTarget #
final EventTarget currentTarget;
Code final bool defaultPrevented #
event.preventDefault()
has been called on the event.
final bool defaultPrevented;
Code final int eventPhase #
final int eventPhase;
Code final EventTarget srcElement #
final EventTarget srcElement;
Code final EventTarget target #
final EventTarget target;
This page includes content from the Mozilla Foundation that is graciously licensed under a Creative Commons: Attribution-Sharealike license. Mozilla has no other association with Dart or dartlang.org. We encourage you to improve the web by contributing to The Mozilla Developer Network.