e.preventdefault() e.stoppropagation()
최근 새로운 e.stoppropagation() 메서드를 발견해서 e.preventdefault() 와의 차이점이 무엇인지 정리해보고자 한다.
우선 이 두 메서드는 모두 Event 인터페이스에서 제공하는 메서드이다.
html에서 표준으로 제공하는 태그의 기본 이벤트 발생을 막는 메서드이다.
[JavaScript] event.preventDefault() 란?
상위 엘리먼트로의 이벤트 전파(이벤트 버블링)을 막기 위한 메서드이다
https://ifuwanna.tistory.com/289
https://developer.mozilla.org/ko/docs/Web/API/Event