Re: [whatwg/dom] Figure out how listeners should fire AT_TARGET when doing retargeting (#237)

Thank you @hayatoito. Having read through those it sounds like Shadow DOM means to define 3 from the options @smaug---- lists above. The rationale is that normally event listeners are bubbling listeners and therefore the expectation is that events go from innermost to outermost.

My proposal has 2 for the same reason @hayatoito originally went with 2, but that is easy to fix.

Approach 1 is a split approach. On the way down, only invoke capturing listeners for the targets, on the way up, only invoke bubbling listeners for the targets. Since both capturing and bubbling listeners run on targets, you can technically divide them like this and it seems Gecko does this (including for user agent shadow trees). The downside of this approach is that you can detect whether an element is a shadow host. I think therefore we should not go with it.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/237#issuecomment-214682224

Received on Tuesday, 26 April 2016 09:27:47 UTC