true
the conditional delay is cancelled and
is called. Otherwise this object keeps to invoke the deferred function until
either it returns true
or the timeout is exceeded. In the latter case
the method will be called.
The interval duration and timeout can be specified each time the delay is
started. Calling start on an active delay will reset the timer.
goog.Disposable | |
goog.async.ConditionalDelay | goog.Disposable |
listener
: function():boolean
Function to call when the delay
completes. Should return a value that type-converts to
true if
the call succeeded and this delay should be stopped. |
opt_handler
: Object=
The object scope to invoke the function in.
|
![]()
No description.
|
code » | |||
No description.
Returns: boolean
True if the delay is currently active, false otherwise.
|
code » | |||
No description.
Returns: boolean
True if the listener has been executed and returned
true since the last call to .
|
code » | |||
![]()
The function that will be invoked after a delay.
|
code » | |||
![]()
Called when this delayed call is cancelled because the timeout has been
exceeded, and the listener has never returned
true .
Designed for inheritance, should be overridden by subclasses or on the
instances if they care.
|
code » | |||
![]()
Called when the listener has been successfully executed and returned
true . The method should return true by now.
Designed for inheritance, should be overridden by subclasses or on the
instances if they care.
|
code » | |||
![]()
A callback function for the underlying
goog.async.Delay object. When
executed the listener function is called, and if it returns true
the delay is stopped and the method is invoked.
If the timeout is exceeded the delay is stopped and the
method is called.
|
code » | |||
![]()
Starts the delay timer. The provided listener function will be called
repeatedly after the specified interval until the function returns
true or the timeout is exceeded. Calling start on an active timer
will stop the timer first.
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 » |
![]()
No description.
|
Code » | |
The underlying goog.async.Delay delegate object.
|
Code » | |
![]()
The object context to invoke the callback in.
|
Code » | |
![]()
The delay interval in milliseconds to between the calls to the callback.
Note, that the callback may be invoked earlier than this interval if the
timeout is exceeded.
|
Code » | |
![]()
True if the listener has been executed, and it returned
true .
|
Code » | |
![]()
The timeout timestamp until which the delay is to be executed.
A negative value means no timeout.
|
Code » |
![]()
No description.
|
Code » |