버블링
-
이벤트 전파개발공부/CS 2024. 2. 8. 21:16
본 글을 자바스크립트의 이벤트 전파에 대해 다룬 내용입니다. 목차 1. 이벤트 전파(Event Propagation)란? 2. 이벤트 전파의 종류 (버블링, 캡처링) 프론트엔드 개발자가 이벤트 전파에 대해 이해하면 사용자와의 상호작용을 관리하고, 효율적으로 이벤트를 처리할 수 있다. 1. 이벤트 전파(Event Propagation)란? 이벤트 전파에 대해 간단하게 정리하면 아래와 같다. HTML 문서 내에서 이벤트가 발생하면, 해당 이벤트가 어떻게 처리되는지를 설명하는 개념 위에 내용만 읽어봤을 때는 무슨 말인지 이해 못할 수도 있다. 아래 과정을 통해 이벤트 전파가 어떻게 일어나는지 알아보자! 이벤트 처리 과정 사용자의 상호작용(예: 클릭, 마우스 오버 등)으로 인해 이벤트 발생 → 이벤트 타깃(Ev..