goog.Disposable | |
goog.events.EventHandler | goog.Disposable |
opt_scope
: SCOPE=
Object in whose scope to call the listeners.
|
![]()
Disposes of this EventHandler and removes all listeners that it registered.
|
code » | ||||||
No description.
Returns: number
Number of listeners registered by this handler.
|
code » | ||||||
![]()
Default event handler
Arguments:
|
code » | ||||||
Listen to an event on a Listenable. If the function is omitted then the
EventHandler's handleEvent method will be used.
Arguments:
|
code » | ||||||
Listen to an event on a Listenable. If the function is omitted, then the
EventHandler's handleEvent method will be used. After the event has fired the
event listener is removed from the target. If an array of event types is
provided, each event type will be listened to once.
Arguments:
|
code » | ||||||
Listen to an event on a Listenable. If the function is omitted, then the
EventHandler's handleEvent method will be used. After the event has fired the
event listener is removed from the target. If an array of event types is
provided, each event type will be listened to once.
Arguments:
|
code » | ||||||
Listen to an event on a Listenable. If the function is omitted, then the
EventHandler's handleEvent method will be used. After the event has fired
the event listener is removed from the target. If an array of event types is
provided, each event type will be listened to once.
Arguments:
|
code » | ||||||
Listen to an event on a Listenable. If the function is omitted then the
EventHandler's handleEvent method will be used.
Arguments:
|
code » | ||||||
Adds an event listener with a specific event wrapper on a DOM Node or an
object that has implemented
goog.events.EventTarget . A listener can
only be added once to an object.
Arguments:
|
code » | ||||||
Adds an event listener with a specific event wrapper on a DOM Node or an
object that has implemented
goog.events.EventTarget . A listener can
only be added once to an object.
Arguments:
|
code » | ||||||
Adds an event listener with a specific event wrapper on a DOM Node or an
object that has implemented
goog.events.EventTarget . A listener can
only be added once to an object.
Arguments:
|
code » | ||||||
Listen to an event on a Listenable. If the function is omitted then the
EventHandler's handleEvent method will be used.
Arguments:
|
code » | ||||||
![]()
Unlistens to all events.
|
code » | ||||||
Unlistens on an event.
Arguments:
Returns: !goog.events.EventHandler
This object, allowing for chaining of
calls.
|
code » | ||||||
Removes an event listener which was added with listenWithWrapper().
Arguments:
Returns: !goog.events.EventHandler
This object, allowing for chaining of
calls.
|
code » |
![]()
Invokes a callback function when this object is disposed. Callbacks are
invoked in the order in which they were added.
Arguments:
|
code » | |||
![]()
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: void
Nothing.
|
code » | |||
![]()
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() { mypackage.MyClass.base(this, 'constructor'); // Constructor logic specific to MyClass. ... }; goog.inherits(mypackage.MyClass, goog.Disposable); mypackage.MyClass.prototype.disposeInternal = function() { // Dispose logic specific to MyClass. ... // Call superclass's disposeInternal at the end of the subclass's, like // in C++, to avoid hard-to-catch issues. mypackage.MyClass.base(this, 'disposeInternal'); }; |
code » | |||
Use
#isDisposed instead.
No description.
Returns: boolean
Whether the object has been disposed of.
|
code » | |||
No description.
Returns: boolean
Whether the object has been disposed of.
|
code » | |||
![]()
Associates a disposable object with this object so that they will be disposed
together.
Arguments:
|
code » |
![]()
No description.
|
Code » | |
![]()
Utility array used to unify the cases of listening for an array of types
and listening for a single event, without using recursion or allocating
an array each time.
|
Code » |