Search code examples
javascriptdombrowserdom-eventsterminology

does the capturing and bubbling phases reaches the event.target node?


According to MDN modern browsers run two different phases when an event is fired:

  • The capture phase (evt.target included)

  • The bubbling phase (evt.target included)

According to WHATWG event.stopPropagation() prevents event from reaching any objects other than the current object.

According to MDN event.stopPropagation() prevents further propagation of the current event in the capturing and bubbling phases.

So i would like to know whether or not is correct to say that the capturing and bubbling phases reaches the event.target node.


Solution

  • No, the capturing and bubbling phases does not reaches the event.target node.

    modern browsers run three different phases, the capturing phase, the target phase, and the bubbling phase.

    https://dom.spec.whatwg.org/#dom-event-eventphase

    https://github.com/mdn/content/issues/6657