debounced-events

0.0.2 • Public • Published

[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 */ })

Readme

Keywords

none

Package Sidebar

Install

npm i debounced-events

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

2.27 kB

Total Files

6

Last publish

Collaborators

  • hopsoft