dojo/throttle
Summary
Create a function that will only execute once per wait
periods.
Create a function that will only execute once per wait
periods from last execution when called repeatedly. Useful for preventing excessive calculations in rapidly firing events, such as window.resize, node.mousemove and so on.
Usage
throttle
(cb,wait);
Parameter | Type | Description |
---|---|---|
cb | Function |
The callback to fire. |
wait | Integer |
time to delay before allowing cb to call again. |
Methods
© 2005–2017 JS Foundation
Licensed under the AFL 2.1 and BSD 3-Clause licenses.
http://dojotoolkit.org/api/1.10/dojo/throttle.html