JavaScript for WordPress Forums Vanilla JavaScript 1.4.6 – Event Propagation – Simple question about .id Reply To: 1.4.6 – Event Propagation – Simple question about .id

#27577
bruno
Participant

Tx!

I have another question!

I’m trying to comprehend the event propagation, and I have like a conceptual question:

I understand what is happening with the capturing and bubbling phase, what I don´t fully understand is what we are doing on the 3º parameter on the addEventListener method like:

el.addEventListener( 'click', theFunc, false);
el.addEventListener( 'click', theFunc, true);

when we set false, or true on that parameter, what we are saying is basically “how the notification of the event will occur, if after or before the event target happens?”

something like that? Maybe it’s a messy quesiton, and I´m not doing it correctly, let me know.