goog.Disposable | |
goog.async.Delay | goog.Disposable |
listener
: Function
Function to call when the delay completes.
|
opt_interval
: number=
The default length of the invocation delay (in
milliseconds).
|
opt_handler
: Object=
The object scope to invoke the function in.
|
![]()
Disposes of the object, cancelling the timeout if it is still outstanding and
removing all object references.
|
code » | ||
![]()
Invokes the callback function after the delay successfully completes.
|
code » | ||
![]()
Fires delay's action even if timer has already gone off or has not been
started yet; guarantees action firing. Stops the delay timer.
|
code » | ||
![]()
Fires delay's action only if timer is currently active. Stops the delay
timer.
|
code » | ||
No description.
Returns: boolean
True if the delay is currently active, false otherwise.
|
code » | ||
![]()
Starts the delay timer. The provided listener function will be called after
the specified interval. Calling start on an active timer will reset the
delay interval.
Arguments:
|
code » | ||
![]()
Stops the delay timer if it is active. No action is taken if the timer is not
in use.
|
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 when the delay finishes.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
The object context to invoke the callback in.
|
Code » | |
![]()
Identifier of the active delay timeout, or 0 when inactive.
|
Code » | |
![]()
The default amount of time to delay before invoking the callback.
|
Code » | |
![]()
The function that will be invoked after a delay.
|
Code » |
![]()
No description.
|
Code » |