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.

Motivation

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 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 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.

Specification

Specification link


Specification being incubated in a Community Group

Status in Chromium

Blink>DOM


No active development (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

Owner

Last updated on 2020-12-15