debounce

dojo/debounce

Summary

Create a function that will only execute after wait milliseconds

Create a function that will only execute after wait milliseconds of repeated execution. Useful for delaying some event action slightly to allow for rapidly-firing events such as window.resize, node.mousemove and so on.

Usage

debounce(cb,wait);
Parameter Type Description
cb Function

A callback to fire. Like hitch() and partial(), arguments passed to the returned function curry along to the original callback.

wait Integer

Time to spend caching executions before actually executing.

Methods

© 2005–2015 The Dojo Foundation
Licensed under the AFL 2.1 and BSD 3-Clause licenses.
http://dojotoolkit.org/api/1.10/dojo/debounce.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部