Re: [webcomponents] Use FrozenArray<T> in WebIDL (#361)

`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.

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

Received on Wednesday, 9 March 2016 11:33:51 UTC