Re: [pointerevents] "This API always returns at least one coalesced event for pointermove events and an empty list for other types of PointerEvents."

Sorry for the delay. Apparently I missed this issue before.

> So, if one creates new pointermove event using JS (but passes empty array as coalescedEvents), does getCoalescedEvents really return non-empty array?

Yes. They can also create a pointerdown event and pass a non-empty array as coalescedEvents and they will get the same array from that object. In general the constructor doesn't modify what is fed by the developer. Whatever guarantee you will see in the spec is for the trusted events. I believe that is the same pattern in other places as well. For example we said the pressure is 0 for pointerup events (in the original pointerevent spec). That doesn't mean one cannot create an un-trusted pointerup with non-zero pressure. 

> Also, the spec contradicts itself.
> "None of the events in the sequence will have (nested) coalesced events, so getCoalescedEvents returns an empty sequence for them."
> 
> So, empty sequence for the pointermove events in the list, but
> 
> "This API always returns at least one coalesced event for pointermove events and an empty list for other types of PointerEvents."
> 

I guess the above comment might address this too as that restriction is not for all pointermove ever generated. But I see your point as the coalesced events are also happen to be trusted. Would it be better to change the sentence to say:

_None of the events in the sequence will have (nested) coalesced events, so getCoalescedEvents returns an empty sequence for them. This API always returns at least one coalesced event for **dispatched** pointermove events and an empty list for other types of PointerEvents._

Note that the coalesced events are never dispatched on their own.

-- 
GitHub Notification of comment by NavidZ
Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/224#issuecomment-341218789 using your GitHub account

Received on Wednesday, 1 November 2017 19:47:38 UTC