Skip to content
GitLab
Explore
Sign in
This is an archived project. Repository and other project resources are read-only.
A17
a17-helpers
Wiki
debounce
debounce
· Changes
Page history
Initial transfer from old non public wiki
authored
Mar 06, 2018
by
Mike Byrne
Hide whitespace changes
Inline
Side-by-side
debounce.md
0 → 100644
View page @
c907d7e5
**Basic syntax:**
`debounce(func,[wait=0],[reverse=false])`
Work like any standard debounce function. The only thing needs to be notice is that if set the last argument to true. Then it will accept the first function call during the duration instead of the last one like the standard way.
**Usage case:**
`document.addEventListener('scroll', debounce(_onScroll, 50));`