Debouncing enforces that a function not be called again until a certain amount of time has passed without it being called. As in "execute this function only if 100 milliseconds have passed without it being called."
var jodit = Jodit.make('.editor');
jodit.e.on('mousemove', jodit.async.debounce(() => {
// Do expensive things
}, 100));
Optional
reason: anyOptional
options: { Rest
...args: any[]Throttling enforces a maximum number of times a function can be called over time. As in "execute this function at most once every 100 milliseconds."
var jodit = Jodit.make('.editor');
jodit.e.on(document.body, 'scroll', jodit.async.throttle(function() {
// Do expensive things
}, 100));
If you like Jodit - try Jodit PRO
Smart wrapper for
cancelAnimationFrame