implement a 'clear' method for throttled functions

pull/1/head
ansuz 5 years ago
parent 49d79ee3e2
commit 240b6054fd

@ -310,6 +310,10 @@
clearTimeout(to);
to = setTimeout(Util.bake(f, Util.slice(arguments)), ms);
};
g.clear = function () {
clearTimeout(to);
to = undefined;
};
return g;
};

Loading…
Cancel
Save