class js.html.Event

Available on js

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.



Documentation for this class was provided by MDN.

Class Fields

var BLUR:Int

var NONE:Int

Instance Fields

var bubbles:Bool

A boolean indicating whether the event bubbles up through the DOM or not.

var cancelBubble:Bool

A boolean indicating whether the bubbling of the event has been canceled or not.

var cancelable:Bool

A boolean indicating whether the event is cancelable.

var currentTarget:EventTarget

A reference to the currently registered target for the event.

var defaultPrevented:Bool

Indicates whether or not event.preventDefault() has been called on the event.

var eventPhase:Int

Indicates which phase of the event flow is being processed.

var target:EventTarget

A reference to the target to which the event was originally dispatched.

var timeStamp:Int

The time that the event was created.

var type:String

The name of the event (case-insensitive).

function new(type:String, canBubble:Bool, cancelable:Bool):Void

function initEvent(eventTypeArg:String, canBubbleArg:Bool, cancelableArg:Bool):Void

function preventDefault():Void