[Bug 21269] [Shadow]: Should Non-bubbling events in ShadowRoot children trigger listeners on Host?

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

--- Comment #4 from Daniel Freedman <dfreedm@google.com> ---
I think there are actually two different use cases here: non-bubbling events
sent by the platform (like focus and blur), and developer generated events
fired through script (shadowedElement.dispatchEvent(new CustomEvent('foo',
{bubbles: false}))).

In the first case, it makes sense for the host to see these events, as this
preserves the transparency of the ShadowRoot w.r.t. behaving like any other
element.

In the second case, it makes sense for the host to *not* see these events, as
that seems like a leak in the encapsulation of the ShadowRoot. I can imagine
developer defined shadows, or Custom Elements, that use a non-bubbling event as
API. If this event would also fire on the host, a developers only recourse to
prevent that is by using stopImmediatePropagation, which will prevent any other
handlers at the shadowedElement for that event from firing.

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

Received on Monday, 1 April 2013 18:11:16 UTC