# 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:Public Protected Private

## Instance Methods

code »dispose ( )
Deprecated: Events don't need to be disposed.

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

code »disposeInternal ( )
Deprecated: Events don't need to be disposed.

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

code »preventDefault ( )

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

code »stopPropagation ( )

Stops event propagation.

## Instance Properties

code »currentTarget : `(Object|undefined)`

Object that had the listener attached.

code »defaultPrevented : `boolean`

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.

code »propagationStopped_ : `boolean`

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

code »returnValue_ : `boolean`

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

code »target : `(Object|undefined)`

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

code »type : `string`

Event type.

## Static Functions

code »goog.events.Event.preventDefault ( e )

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.

code »goog.events.Event.stopPropagation ( e )

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.