Re: [touch-events] TouchEvent constructor is very unusual since it converts one type of object (sequence) to another type (TouchList) (#54)

Yeah I agree this is a little weird.  `TouchList` itself seems like legacy, but presumably we can't change the type of the existing `TouchEvent` properties.  I called this out as something to discuss [in the PR](https://github.com/w3c/touch-events/pull/16#issuecomment-119785062) and on the list, but there were no concerns raised at the time.

Would you prefer if callers had to explicitly create `TouchList` instances?  Eg:
```javascript
  new TouchEvent(touches: new TouchList([touch]), changedTouches: new TouchList([touch]), targetTouches: new TouchList([touch]))?
```
It's probably too late for us to change blink to require that, but we could perhaps permit both styles. 

Or maybe we can compatibly change the type of the `TouchEvent` members to be something other than `TouchList`?  `sequence<Touch>` is probably out because we probably don't want to require a copy on every read (and so [that's illegal](https://heycam.github.io/webidl/#idl-sequence) anyway - I just [raised this issue with `FontFaceLoadEvent`](https://lists.w3.org/Archives/Public/www-style/2015Dec/0281.html)).  Should we ideally be using `FrozenArray<Touch>` perhaps?

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/touch-events/issues/54#issuecomment-166739970

Received on Tuesday, 22 December 2015 21:51:57 UTC