W3C promotes Pointer Events to Proposed Recommendation

Today the W3C promoted the Pointer Events specification to Proposed Recommendation status coming just before a technology becomes a recommended standard.

Pointer Events is a technology originally implemented in Internet Explorer to simplify the way developers deal with input events in a web application or site, abstracting the type of input (mouse, touch, pen, Kinect, etc) and providing a unified model. The technology has been proposed by Microsoft to the W3C for standardization and MS Open Tech has since been working with the community to demonstrate interoperability in other browsers based on WebKit, Blink and Gecko. Both Internet Explorer and a build of Firefox that Mozilla is working on in a branch of their code base now report 100% test pass on all Pointer Events tests. Mozilla intends to port their implementation from this branch to all other flavors of Firefox.

Pointer Events makes developers life easier

Pointer Events solves a fundamental issue web developers are facing: think about the code you have to write today to make sure your Web site (or web app) behaves when browsed on using a mouse, touch and a pen! With no unified model, you have to hook up to as many events as there are input types, you have to figure out which one is which, considering some browsers compensate the fact they don’t support all input types by “simulating” mouse or touch events. Pointer Events addresses exactly this problem by exposing a universal pointer model, triggering a single event whether the user interacts with the bowser using a mouse, touch or a pen. Developers can share code across input types when it’s convenient, but can still differentiate/augment for a specific input type when desired. You can find a lot of details on Web Platforms Docs.

Pointer Events can be used today.

As often in the early days of new web technologies, early adopter developers pave the way for others creating polyfills for technologies that are not yet supported across all browsers natively. Pointer Events polyfills such as the Polymer Pointer Events polyfill or Hand.js have been created as soon as Internet Explorer introduced the new technology. And since Chrome added support for the touch-action CSS attribute (allowing developers to take control over elements’ default behavior in response to touch events), it is even simpler to base your code on Pointer Events to unify and simplify multiple input types support in your web app across platforms.

Be a Pointer Events advocate
If like us you think Pointer Events is a great model, no need to wait to use it. Use polyfills where Pointer Events are not natively supported and advocate for a great way of dealing with multiple input points.