yui-later.js revision a76f066cb8261ad9f7c6c4d81d8c3bed2f1a788a
145N/A * Executes the supplied function in the context of the supplied 145N/A * object 'when' milliseconds later. Executes the function a 145N/A * single time unless periodic is set to true. 145N/A * @param when {int} the number of milliseconds to wait until the fn 145N/A * @param o the context object. 5680N/A * @param fn {Function|String} the function to execute or the name of 5680N/A * the method in the 'o' object to execute. 5685N/A * @param data [Array] data that is provided to the function. This 145N/A * accepts either a single item or an array. If an array is provided, 145N/A * the function is executed with one parameter for each array item. 145N/A * If you need to pass a single array parameter, it needs to be wrapped 187N/A * in an array [myarray]. 187N/A * Note: native methods in IE may not have the call and apply methods. 187N/A * In this case, it will work, but you are limited to four arguments. 5685N/A * @param periodic {boolean} if true, executes continuously at supplied 4194N/A * @return {object} a timer object. Call the cancel() method on this 1244N/A * object to stop the timer. 197N/A // IE 8- may execute a setInterval callback one last time 197N/A // after clearInterval was called, so in order to preserve 197N/A // the cancel() === no more runny-run, we have to jump through