[whatwg/dom] Shadow: define event retargeting for shadow trees (#240)

Includes support for scoped events that a number of HTML features
require. The invocation order handles CAPTURE first, then TARGET and
BUBBLE. Retargeting happens during the BUBBLE phase as developers
mostly use BUBBLE listeners and therefore it would be unexpected if
it was interleaved with the CAPTURE phase.

A split approach where capture listeners for the targets are invoked
during CAPTURE and bubble listeners are invoked during BUBBLE was
also considered, but eventually dismissed as it would make shadow
hosts observable.

Fixes #237 and fixes https://github.com/w3c/webcomponents/issues/485.
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/dom/pull/240

-- Commit Summary --

  * Shadow: define event retargeting for shadow trees

-- File Changes --

    M dom.bs (115)
    M dom.html (98)

-- Patch Links --

https://github.com/whatwg/dom/pull/240.patch
https://github.com/whatwg/dom/pull/240.diff

---
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/pull/240

Received on Thursday, 28 April 2016 08:55:13 UTC