[MDN] Event reference
디바운스와 스로틀
- 디바운스와 스로틀은 짧은 시간 간격으로 연속해서 발생하는 이벤트를 그룹화해서 과도한 이벤트 핸들러의 호출을 방지하는 프로그래밍 기법임
- 실무에서는 Underscore의 debounce 함수, Lodash의 debounce 함수를 사용하는것을 권장
- 마찬가지로 Underscored의 throttle, Lodash의 throttle함수
Keyboard Event
- keydown
- keyup
- keypress (Deprecated)
Input Element에 keyboardevent로 작업할 시,
keydown 이벤트 발생시에는 아직 input value에 값이 안 들어가있고,
keyup 이벤트 발생시에는 input value에 값이 들어가 있음.