backport live changes

This commit is contained in:
ansuz
2017-05-26 12:41:30 +02:00
parent 70c1061f47
commit cf658c1b3a
3 changed files with 24 additions and 3 deletions

View File

@@ -122,5 +122,14 @@ define([], function () {
xhr.send(null);
};
Util.throttle = function (f, ms) {
var to;
var g = function () {
window.clearTimeout(to);
to = window.setTimeout(f, ms);
};
return g;
};
return Util;
});