goog.Disposable | |
goog.async.Throttle | goog.Disposable |
listener
: function(this: T)
Function to callback when the action is
triggered.
|
interval
: number
Interval over which to throttle. The listener can
only be called once per interval.
|
opt_handler
: T=
Object in whose scope to call the listener.
|
![]()
No description.
|
code » | |
![]()
Calls the callback
|
code » | |
![]()
Notifies the throttle that the action has happened. It will throttle the call
so that the callback is not called too often according to the interval
parameter passed to the constructor.
|
code » | |
![]()
Function to callback
|
code » | |
![]()
Handler for the timer to fire the throttle
|
code » | |
![]()
Pauses the throttle. All pending and future action callbacks will be
delayed until the throttle is resumed. Pauses can be nested.
|
code » | |
![]()
Resumes the throttle. If doing so drops the pausing count to zero, pending
action callbacks will be executed as soon as possible, but still no sooner
than an interval's delay after the previous call. Future action callbacks
will be executed as normal.
|
code » | |
![]()
Cancels any pending action callback. The throttle can be restarted by
calling
#fire .
|
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 » |
![]()
Cached callback function invoked after the throttle timeout completes
|
Code » | |
![]()
No description.
|
Code » | |
![]()
"this" context for the listener
|
Code » | |
![]()
Interval for the throttle time
|
Code » | |
![]()
Indicates the count of nested pauses currently in effect on the throttle.
When this count is not zero, fired actions will be postponed until the
throttle is resumed enough times to drop the pause count to zero.
|
Code » | |
![]()
Indicates that the action is pending and needs to be fired.
|
Code » | |
![]()
Timer for scheduling the next callback
|
Code » |
![]()
No description.
|
Code » |