A base class for event objects, so that they can support preventDefault and stopPropagation.
extends goog.Disposable| Instance Method Summary | |
disposeInternal()Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects. Classes that extend {@code goog.Disposable} should override this method. Not reentrant. To avoid calling it twice, it must only be called from the subclass' {@code disposeInternal} method. Everywhere else the public {@code 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.
...
};
| |
preventDefault()Prevents the default action, for example a link redirecting to a url. | |
stopPropagation()Stops event propagation. | |
| Static Method Summary | |
preventDefault(!goog.events.Event e)Prevents the default action. It is equivalent to {@code e.preventDefault()}, but can be used as the callback argument of {@link goog.events.listen} without declaring another function. | |
stopPropagation(!goog.events.Event e)Stops the propagation of the event. It is equivalent to {@code e.stopPropagation()}, but can be used as the callback argument of {@link goog.events.listen} without declaring another function. | |