0.0.2 • Published 4 years ago

debounced-events v0.0.2

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

WIP Debounced

NOTE: This project is in alpha and is subject to change.

This library uses event delegation to globally add debounced versions of standard high frequency DOM events. This means you can simply listen for the debounced event instead of adding custom debounce logic.

Only works on high frequency events that bubble.

Examples

document.addEventListener('debounced:input', event => { /* only dispatched once */ })

document.getElementById('example')
  .addEventListener('debounced:keydown', event => { /* only dispatched once */ })