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

Inheritance

Constructor

goog.events.Event(typeopt_target)

Parameters

type :
Event Type.
opt_target :
(Object | null | undefined)
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
disposeInternal()
No description.
code »
preventDefault()
Prevents the default action, for example a link redirecting to a url.
code »
stopPropagation()
Stops event propagation.
code »
dispose()
undefined
Disposes of the object. If the object hasn't already been disposed of, calls #disposeInternal. Classes that extend goog.Disposable should override #disposeInternal in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.
Returns: 
undefined
  Nothing.
code »
disposeInternal()
Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects. Classes that extend goog.Disposable should override this method. Not reentrant. To avoid calling it twice, it must only be called from the subclass' disposeInternal method. Everywhere else the public dispose method must be used. For example:
mypackage.MyClass = function() {
goog.base(this);
// Constructor logic specific to MyClass.
...
};
goog.inherits(mypackage.MyClass, goog.Disposable);

mypackage.MyClass.prototype.disposeInternal = function() {
goog.base(this, 'disposeInternal');
// Dispose logic specific to MyClass.
...
};
code »
getDisposed()
Use #isDisposed instead. No description.
Returns:   Whether the object has been disposed of.
code »
isDisposed()
No description.
Returns:   Whether the object has been disposed of.
code »
registerDisposable(disposable)
Associates a disposable object with this object so that they will be disposed together.
Arguments:
disposable :
that will be disposed when this object is disposed.
code »

Instance Properties

currentTarget :
(Object | null | undefined)
Object that had the listener attached.
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 :
(Object | null | undefined)
Target of the event.
Code »
type :
Event type.
Code »
dependentDisposables_ :
(Array | null)
Disposables that should be disposed when this object is disposed.
Code »
disposed_ :
Whether the object has been disposed of.
Code »

Static Methods

goog.events.Event.call()
No description.
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.
Arguments:
e :
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 :
An event.
code »

Package events

Package Reference