Re: [whatwg/dom] composedPath() is wrong (#684)

So something has bothered me a bit and I'm not sure to what extent we should try solve it now. Before shadow trees you had node trees and event trees/paths. They were roughly analogous as you would only go up and down.

With shadow trees, node trees became more powerful, and some of that leaked into the event API. However, event trees/paths were still as powerful as before. The complexity of shadow trees ended up being a bunch of special cases in event trees/paths, rather than a generic mechanism that, e.g., something like Indexed DB could also use (or `new EventTarget()` once it exposes "get the parent").

The approach I took in #696 moves some of the shadow tree logic into "get the parent" so it's generalized and potentially reusable by other event trees/paths, but not all of it.

Is that a good direction to be heading in?

(If the answer is no, I should probably do the jsdom approach, which basically used the original dispatch and "get the parent" infrastructure to enable the same thing.)

-- 
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/684#issuecomment-421259108

Received on Friday, 14 September 2018 07:35:38 UTC