Re: Last Call comments

On Wed, Apr 10, 2013 at 9:05 AM, Konstantinov Sergey
<twirl@yandex-team.ru>wrote:

> 10.04.2013, 16:50, "Scott González" <scott.gonzalez@gmail.com>:
> > We're not going to wait until we think a specification solves 100% of
> all problems before publishing. We need to be able to iterate. Otherwise,
> way too much time will pass before this is published.
>
> Since we accept the spec, the browsers will start to implement it and the
> developers will start to write code having just the incomplete v1 spec. I
> don't see why this step - implement the spec - is needed. It's already
> implemented in IE10, why to force more browsers and more developers to deal
> with it?
>

I honestly don't know how to respond to this. MSPointerEvent got a lot of
praise. So now we should wait for 100% perfection before anybody else
implements anything?

> Who said anything about breaking back compatibility? What suggested
> change is a breaking change?
>
> Removing the requirement "pointerId = 1 for mouse device", for example.
>

I believe this is one of the most controversial parts of the API. Perhaps
we can revisit this again.


> > The framing will be completely arbitrary for different devices. What's
> wrong with the suggested approach of using requestAnimationFrame()?
>
> Sorry, don't understand about requestAnimationFrame.


Here's the basic idea:

var events = [];
[
	"pointerdown",
	"pointermove",
	"pointerup",
	"pointercancel"
].forEach(function( eventType ) {
	document.addEventListener( eventType, function( event ) {
		events.push( event );
	});
});
function coalesce() {
	if ( events.length ) {
		// Do actual coalescing of events
		console.log( events.length );
		events = [];
	}
	requestAnimationFrame( coalesce );
}
requestAnimationFrame( coalesce );

Received on Thursday, 11 April 2013 15:11:44 UTC