Without this feature, event listeners at the target element of an event are fired in the order of when they were registered, without any regard for which ones are capture and which ones are bubble. With this feature, capture event listeners will be fired before bubble event listeners at the event target.
Without this change, it would be possible to know if an event was fired on an element vs fired inside the element's shadow root, which goes against the philosophy of shadow DOM.
In https://github.com/whatwg/dom/issues/685 it was determined that the capture before bubble at target behavior should occur for elements when the event is fired inside of the element's shadow root and it was implemented in all browsers.
This proposed change to make this behavior always occur regardless of the event's target being inside a shadow root was implemented in WebKit at the same time that they implemented it for the shadow root case 2 years ago without problems.
This could break websites if they depend on the current event order behavior. Apparently, WebKit had no issues when the behavior was changed 2 years ago: https://github.com/whatwg/dom/issues/685#issuecomment-438174611
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAK6btwKbhygRMJa3WbzSAkHJojGEP4Vj97HnS%2BmOjOk4tJdr%2Bg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGH7WqGKoUJ7%3Dvvo91fvzbHrW7WMsdBYvNM2GEhUQpD0oq26cA%40mail.gmail.com.