Class goog.events.Event

code »

A base class for event objects, so that they can support preventDefault and stopPropagation.

Constructor

goog.events.Event ( type, opt_target )
Parameters
type: (string|!goog.events.EventId)
Event Type.
opt_target: Object=
Reference to the object that is the target of this event. It has to implement the EventTarget interface declared at http://developer.mozilla.org/en/DOM/EventTarget.
Show:

Instance Methods

Deprecated: Events don't need to be disposed.

For backwards compatibility (goog.events.Event used to inherit goog.Disposable).

Deprecated: Events don't need to be disposed.

For backwards compatibility (goog.events.Event used to inherit goog.Disposable).

Prevents the default action, for example a link redirecting to a url.

Stops event propagation.

Instance Properties

Object that had the listener attached.

Whether the default action has been prevented. This is a property to match the W3C specification at #events-event-type-defaultPrevented. Must be treated as read-only outside the class.

Whether to cancel the event in internal capture/bubble processing for IE.

Return value for in internal capture/bubble processing for IE.

TODO(user): The type should probably be EventTarget|goog.events.EventTarget. Target of the event.

Event type.

Static Functions

Prevents the default action. It is equivalent to e.preventDefault(), but can be used as the callback argument of goog.events.listen without declaring another function.

Parameters
e: !goog.events.Event
An event.

Stops the propagation of the event. It is equivalent to e.stopPropagation(), but can be used as the callback argument of goog.events.listen without declaring another function.

Parameters
e: !goog.events.Event
An event.