[whatwg/dom] event.composedPath() may return different results if DOM is modified between two calls (#525)

If I read the spec right, composedPath() relies on the current tree structure to figure out what to return.
So, if a listener does then something like
var cp = event.composedPath();
/*move nodes around*/
var cp2 = event.composedPath();

cp and cp2 may contain different nodes, which is surprising, since the internal path for the event hasn't changed.
In particular, relying on "shadow-including inclusive ancestor" in  https://dom.spec.whatwg.org/#concept-closed-shadow-hidden in https://dom.spec.whatwg.org/#dom-event-composedpath looks wrong

-- 
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/525

Received on Monday, 30 October 2017 14:29:12 UTC