Primary eng (and PM) emails
sb...@microsoft.com;
afor...@microsoft.com;
asir...@microsoft.com;
rby...@google.com
Spec
http://www.w3.org/TR/pointerevents/
Summary
The proposed API implements the Pointer Events spec that just graduated to Candidate Recommendation in W3C. As part of that, a first step will be to implement the touch-action feature in C++, which will also be leveraged to improve the experience for the currently supported Touch Events API. In parallel, through a separate runtime flag from touch-action, we will provide the remaining Pointer Events API surface through a JavaScript polyfill so that developers can start experimenting with the full API while we implement the other Pointer Events features in C++.
Motivation
Pointer Events elegantly unifies the interface for different input technologies (mouse, touch, pen) thereby simplifying developer workload and code complexity. Furthermore, it automatically addresses common coding challenges for increasingly ubiquitous device types that allow multiple types of input at the same time. It provides a future-proof abstraction that will allow Pointer Events-enabled web pages to leverage any new input technologies with little if any modifications at all. The API is already supported by Internet Explorer.
The touch-action feature will also benefit the existing Touch Event API by addressing a commonly reported complain re: scrolling jerkiness, which cannot be worked around with the existing API.
Compatibility Risk
Low. This API provides new functionality and it should not break existing behaviors. Steps will be taken prior to check in to ensure that existing input behaviors are thoroughly tested and do not incur into regressions.
OWP launch tracking bug?
crbug.com/196799
Row on feature dashboard?
Yes
Requesting simultaneous permission to ship?
No. Our immediate goal is to perform interoperability testing with other browser implementations and surface spec issues to route back to the W3C.
--
Scott Blomquist
Senior Development Lead
Microsoft Open Technologies, Inc.
A subsidiary of Microsoft Corporation
Can you comment on what it means to "ship" a JavaScript polyfill behind a flag in Chromium? To the best of my knowledge, this is a new thing for us. We don't have any established machinery to support such a thing. Is there a design for how this will be done?
I can imagine that an alternative path would be to simply point web developers at https://github.com/toolkitchen/PointerEvents while we work to develop the C++ implementation of Pointer Events.
(I'm a big fan of implementing touch-action separately and up-front by the way!)
Before implementing Pointer Events in C++, I'd like to see more demand for Pointer Events in the form of developers using Pointer Events via polyfills.
My hope is that this will leave us in a place where we have a great polyfill experience on Chrome and IE 10, and a workable experience on other browsers
+1!! I'm really glad to see this development. It is unrealistic and difficult for the average web developer to have multiple event listeners, listening for `touch*` events along with `mouse*` events, and preventing default behavior on one to prevent the other. It's too complicated for someone who is not using a library or a polyfill. Add to this, the fact that we have multiple ways to subscribe to events (addEventListener() vs attachEvent() in OldIE), and you quickly get into a messy place regarding event subscription.Currently, JS libraries have to manage this in an attempt to provide developers with a higher-level API. This is something that we are working on at YUI @ Yahoo. (https://github.com/yui/yui3/issues/683).The Pointer API in IE10 does a great job of creating a common interface for various inputs. I strongly believe that something like this should be baked into the other browsers.
Any timelines on when we can start playing with something like this in Canary?