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

Inheritance

Constructor

goog.events.Event(typeopt_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.

Instance Methods

Public Protected Private
dispose()
Events don't need to be disposed. For backwards compatibility (goog.events.Event used to inherit goog.Disposable).
code »
disposeInternal()
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.
code »

Instance Properties

currentTarget :
Object that had the listener attached.
Code »
defaultPrevented :
Whether the default action has been prevented. This is a property to match the W3C specification at http://www.w3.org/TR/DOM-Level-3-Events/ #events-event-type-defaultPrevented. Must be treated as read-only outside the class.
Code »
propagationStopped_ :
Whether to cancel the event in internal capture/bubble processing for IE.
Code »
returnValue_ :
Return value for in internal capture/bubble processing for IE.
Code »
target :
Target of the event.
Code »
type :
Event type.
Code »

Static Methods

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.
Arguments:
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.
Arguments:
e : !goog.events.Event
An event.
code »

Package events

Package Reference