The debounce answer isn't quite right... the timeout should be from the first call, it should hold a map against the callback method, and expressly not reset the timer... the debounce should (generally) be from the first call, not the most recent call. Although there are times you may want that kind of debounce, that's not how most libraries implement it.