Java Reference
In-Depth Information
Event
When an event fi res, an Event object is passed to the event handler if one is specifi ed. This object con-
tains contextual information about an event.
Properties
Property Name
Description
Introduced
bubbles
Indicates whether or not the event is a bubbling event.
Level 2
cancelable
Indicates whether or not the event can have its default action
prevented.
Level 2
currentTarget
Indicates the EventTarget whose listeners are currently
being processed.
Level 2
target
Indicates the EventTarget object to which the event was
originally fi red.
Level 2
timeStamp
Specifi es the time (in milliseconds) at which the event was
fi red.
Level 2
type
The name of the event (remember: this is the name without
the on prefi x).
Level 2
Methods
Method Name
Description
Introduced
preventDefault()
Cancels the event, preventing the default action from
taking place, only if the event is cancelable.
Level 2
stopPropagation()
Prevents further propagation of an event.
Level 2
MouseEvent
The MouseEvent object provides specifi c information associated with mouse events. MouseEvent objects
contain not only the following properties, but also the properties and methods of the Event object.
Valid mouse events are shown in the following table.
Event Name
Description
click
Occurs when the mouse button is clicked over an element. A click is defi ned as
a mousedown and mouseup over the same screen location.
mousedown
Occurs when the mouse button is pressed over an element.
Search WWH ::




Custom Search