yui-throttle-debug.js revision 952ddc23366b3f5c426f0ca05297144c6166a418
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle * Provides a throttle/limiter for function calls
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle * @module yui
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle * @submodule yui-throttle
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle * Throttles a call to a method based on the time between calls.
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle * @method throttle
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle * @param fn {function} The function call to throttle.
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle * @param ms {int} The number of milliseconds to throttle the method call. Can set
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle * globally with Y.config.throttleTime or by call. Passing a -1 will disable the throttle. Defaults to 150
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle * @return {function} Returns a wrapped function that calls fn throttled.
bdcef189d83ab13d06dde11499a03b16cdb5b432Chad Kienle return (function() {
44e29ab1a81842519755c5d3b9a3403efad35354Laszlo Hordos return (function() {