none
var processor = {
timeoutId:null,
performProcessoring:function(){
// do something
},
process:function(){
clearTimeout(this.timeoutId);
var that = this;
this.timeoutId = setTimeout(function(){
that.performProcessoring();
},100)
}
}
/** throttle**/
function throttle(method,context){
clearTimeout(method.tId);
method.tId = setTimeout(function(){
method.call(context);
},100)
}
//example
function resizeDiv(){
}
window.onresize = function(){
throttle(resizeDiv)
}