-
Notifications
You must be signed in to change notification settings - Fork 24
TouchEvent constructor is very unusual since it converts one type of object (sequence) to another type (TouchList) #54
Comments
Yeah I agree this is a little weird. Would you prefer if callers had to explicitly create 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 |
Or do you think we should just add prose defining how |
I think I could live with adding just prose defining how TouchLists are created. |
I wouldn't want to say it's necessarily too late to remove To me, from a web dev perspective that design seems strictly worse. They don't think about I looked for precedent elsewhere and found one example of something similar in the notifications spec. There they use a It would probably be compatible to replace |
Hmm, |
As I said on IRC, I consider about everything in ServiceWorker to be pretty much anti-pattern for the web. |
in light of us wanting to potentially deprecate #80 is this still relevant? perhaps for clarity/historical reasons? |
I'm not aware of other events having such ctors.
Maybe this was already discussed in some other bug, but don't recall now.
Anyhow the inconsistency is a bit annoying.
And more importantly it isn't defined how one creates a TouchList from sequence.
This is perhaps mostly editorial (tough I'm not happy with the inconsistency).
The text was updated successfully, but these errors were encountered: