[Bug 23887] [Shadow] Put only the final destination insertion point to the event path

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23887

--- Comment #43 from Steve Orvell <sorvell@chromium.org> ---
Let's go back to this case in
https://www.w3.org/Bugs/Public/show_bug.cgi?id=23887#c39 and review the
counter-argument.

    <content select=".header"></content>
    <content select=".content"></content>


> Why? Add a listener to the shadow host? You can easily filter out events in the 
> listener, for example by using the content.getDistributedNodes().
> Or you can add listeners to the distributed nodes themselves.

Neither option is acceptable.

If a listener is added to the shadowRoot, then each handler must start at
event.target and walk up the tree checking if the element is in the specific
content's list of distributed nodes. This has a non-trivial cost in code and
performance.

Alternatively, if handlers are attached to the distributed nodes, there's no
good way today for the developer to respond to nodes that are added/removed.
You can watch for mutations on the host's childList, but you will not see
elements that are re-projected this way.

At this point, I don't see an alternative to requiring all insertion points to
be in the event path. If we don't include insertion points, we run into the
problems listed above. If we include only the last insertion point, we have
composition fail.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 26 February 2014 03:20:48 UTC