const ul = document.querySelector("ul");
ul.addEventListener(
"click",
(event) => {
console.log(event.target);
},
true
);
<ul>
<li>
<h2> ITEM 1 </h2>
</li>
<li>
<h2> ITEM 2 </h2>
</li>
</ul>
how is event propagation involved in this event listener? (is it involved at all?) since changing the third argument of the event listener does nothing in this code snippet, I can't understand the connection of event propagation here
in the above code; event.target always refers to the h2 element if we click on it, and never refers to the li, even though we have enabled capturing phase in this example.