- From: Anne van Kesteren <notifications@github.com>
- Date: Mon, 06 Nov 2017 15:16:44 +0000 (UTC)
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/issues/525/342179455@github.com>
@smaug---- and I tried to sketch out a different model here, review appreciated! > When appending to path assume the arguments in the tuple are always named (target, targetOverride, relatedTarget), in step 5, 9.2.2, and 9.4.2 of https://dom.spec.whatwg.org/#concept-event-dispatch. Assume that invokes an algorithm that runs the following steps before appending the tuple to the path: > * If target is a shadow root whose mode is "closed", then set root-of-closed-tree to true in the tuple. > * If target is a slot, target's root is a shadow root whose mode is "closed", targetOverride is non-null, targetOverride is assigned, and targetOverride's assigned slot is target, then set slot-in-closed-tree to true in the tuple. > > Then `composedPath()` is defined as follows: > 1. let reversedComposedPath be an empty list > 1. let hiddenSubtreeLevel be 0 > 1. let hasSeenCurrentTarget be false > 1. reverse iterate path (from Window to the target of the event): > 1. if tuple's item is currentTarget, set hasSeenCurrentTarget to true > 1. else if hasSeenCurrentTarget is true and tuple's item has root-of-closed-tree flag, increase hiddenSubtreeLevel by 1. > 1. if hiddenSubtreeLevel is 0, append tuple's item to reversedComposedPath. > 1. if tuple's item has slot-in-closed-tree, decrease hiddenSubtreeLevel by 1. > 1. return reverse(reversedComposedPath) -- 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#issuecomment-342179455
Received on Monday, 6 November 2017 15:17:07 UTC