Class YAHOO.ext.util.DelayedTask
Object
|
+--YAHOO.ext.util.DelayedTask
- class
YAHOO.ext.util.DelayedTask
Provides a convenient method of performing setTimeout where a new
timeout cancels the old timeout. An example would be performing validation on a keypress.
You can use this class to buffer
the keypress events for a certain number of milliseconds, and perform only if they stop
for that amount of time.
Defined in yutil.js
|
Method Summary
* Parameter types in italic indicate optional parameters
|
void
|
cancel()
Cancel the last queued timeout
|
void
|
delay(<Number> delay, <Function> newFn, <Object> newScope, <Array> newArgs)
Cancels any pending timeout and queues a new one
|
YAHOO.ext.util.DelayedTask
YAHOO.ext.util.DelayedTask(<Function> fn, <Object> scope, <Array> args)
Parameters:
fn - (optional) The default function to timeout
scope - (optional) The default scope of that timeout
args - (optional) The default Array of arguments
cancel
void cancel()
Cancel the last queued timeout
delay
void delay(<Number> delay, <Function> newFn, <Object> newScope, <Array> newArgs)
Cancels any pending timeout and queues a new one
Parameters:
delay - The milliseconds to delay
newFn - Overrides function passed to constructor
newScope - Overrides scope passed to constructor
newArgs - Overrides args passed to constructor
Documentation generated by
JSDoc on Sat Oct 14 06:07:10 2006