[webcomponents] Change deepPath() back to path (a FrozenArray<EventTarget> attribute) (#428)

Continuing from https://github.com/w3c/webcomponents/issues/361#issuecomment-194252542:

> `Event.deepPath()` came up in a [Shadow DOM v1: Status updates](https://groups.google.com/a/chromium.org/d/msg/Blink-dev/BUGxw_Yx5Lo/tunJEUYXAQAJ) blink-dev thread, where I question why this is a method and why we can't just stick with `Event.path`.
>
> The core of my concern is that there's no particular reason to think it will ever be possible to remove `Event.path` from Blink. The [usage](https://www.chromestatus.com/metrics/feature/timeline/popularity/345) (~2.5%) is almost certainly inflated by enumeration (making copies of events) but that still means we have no idea about how risky such a change would be.
>
> I think a only a `readonly attribute FrozenArray<EventTarget> path` with deep semantics should be very seriously considered. There are two warts that I know of:
> * All other things in DOM operate on the "local" tree, so using the generic name `path` for the deep event path is a bit inconsistent.
> * A method makes it more obvious that a computation required.
>
> Still, at least in my mind, this is not terrible enough to risk yet another duplicated API in the long run, like `document.characterSet`+`document.charset` and innumerable prefixed APIs.

@annevk also asks "whether Blink includes WindowProxy in the path", and it would be good to flesh out [the definition](http://w3c.github.io/webcomponents/spec/shadow/#widl-Event-deepPath-sequence-EventTarget) a bit.

Here's a quick and basic test for that:
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3975

In Chrome Canary it prints `["HTMLButtonElement","ShadowRoot","HTMLDivElement","HTMLBodyElement","HTMLHtmlElement","HTMLDocument","Window"]` so the Window(Proxy) is included in the path.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/428

Received on Wednesday, 9 March 2016 12:22:59 UTC