I have the following html and with event bubbling it makes perfect sense to me how it works. It bubbles up, so clicking on three would give me three, two, one. Clicking on two, would give me two and one.
However with capture: true, when I click on three it works as I feel it should, it goes down from one to three. What I don't understand is when I click on one or two, why does it not capture down. If I click on one, it should capture down and give me one, two, three. If I click on two, it should give me two, three.
const divs = document.querySelectorAll('div');
function logText(e) {
console.log(this.classList.value);
}
divs.forEach(div => div.addEventListener('click', logText, {
capture: true
}));
<div class="one">
one
<div class="two">
two
<div class="three">
three
</div>
</div>
</div>