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

#27585
Zac Gordon
Keymaster

It always starts at the window level. But if you don’t have an event listener on the window you won’t notice it.

In our example we have a listener attached to the parent element so that is where it ‘starts’ for us because that is the highest element in the tree we have a listener attached to.

However, you could attach a listener to any element higher in that chain and have the same effect.

Hope that explains it? Let me know if it’s still unclear.

So happy to hear you’re enjoying the course!!!!!