Name

Event: information about an event — DOM Level 2 Events, IE: Object → Event

Subinterfaces

UIEvent

Standard Properties

The following properties are defined by the DOM Level 2 Events standard. See also KeyEvent, MouseEvent, and UIEvent for additional type-specific event properties:

readonly boolean bubbles

true if the event is of a type that bubbles (unless stopPropagation( ) is called); false otherwise.

readonly boolean cancelable

true if the default action associated with the event can be canceled with preventDefault( ); false otherwise.

readonly Object currentTarget

The Element, Document, or Window that is currently handling this event. During capturing and bubbling, this is different from target.

readonly unsigned short eventPhase

The current phase of event propagation. The value is one of the following three constants, which represent the capturing phase, normal event dispatch, and the bubbling phase:

eventPhase Constant

Value

Event.CAPTURING_PHASE

1

Event.AT_TARGET

2

Event.BUBBLING_PHASE

3

readonly Object target

The target node for this event—i.e., the Element, Document, or Window that generated the event.

readonly Date timeStamp

The date and time at which the event occurred (or, technically, at which the Event object was created). Implementations are not required to provide valid time data in this field, and if they do not, the getTime( ) method of this Date object should return 0. See Date in Part III of this book.

readonly String type

The name ...

Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.