Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix dispatch event for capturing/bubbling phases for own target
The standard is not very clear about that. On the general description of events (https://dom.spec.whatwg.org/#events) it says "all the object’s inclusive ancestor event listeners whose capture is true are invoked" for capturing and bubbling phases. So the target itself *should be included*. But later when describing the phases (https://dom.spec.whatwg.org/#dom-event-eventphase) it says that capturing phase is _before_ the target and bubbling phase is _after_ the target. So the target itself *should not be included*. The behavior of modern web browsers (Chrome/Firefox) do not include the target in capturing/bubbling phase so let's follow that. Signed-off-by: Francis Bouvier <[email protected]>
- Loading branch information