As of right now the Element#addEventListener
's third argument is used to set the useCapture
Now the reason I’d like it changed is for Throttling/debouncing, therefore:
el.addEventListener('mousemove', cb, {
capture: true, // way of still being able to pass usecapture
throttle: 200, // 200 milliseconds
debounce: 200, // 200 milliseconds
});
So because we can’t break the web it accepts 2 types the boolean for the useCapture
and the object shown above, therefore we can still do:
el.addEventListener('mousemove', cb, true);
The third argument as an object will also allow for any future things we’d like to add as well.