const moveThrottled = throttle( (elapsedMs, args) => {
// Handle ar
}, 500);
el.addEventListener(`pointermove`, moveThrottled)
Note that throttle
does not schedule invocations, but rather acts as a filter that
sometimes allows follow-through to callback
, sometimes not. There is an expectation then
that the return function from throttle
is repeatedly called, such as the case for handling
a stream of data/events.
Throttles a function. Callback only allowed to run after minimum of
intervalMinMs
.