Merge pull request #174 from rsyring/patch-1

Clarify order of bubble/capture handlers on the target
This commit is contained in:
Ilya Kantor 2017-09-08 18:19:34 +02:00 committed by GitHub
commit fba08b5c02

View file

@ -145,7 +145,7 @@ There are two possible values for that optional last argument:
Note that while formally there are 3 phases, the 2nd phase ("target phase": the event reached the element) is not handled separately: handlers on both capturing and bubbling phases trigger at that phase.
If one puts a handler on the target element -- it triggers last on the capturing state, and first on the bubbling stage.
If one puts capturing and bubbling handlers on the target element, the capture handler triggers last in the capturing phase and the bubble handler triggers first in the bubbling phase.
Let's see it in action: