Monday, February 9, 2015

Pointer Event JavaScript won't be supported in Chrome




Pointer Event JavaScript API won't be supported in Chrome


PointerEvent JavaScript api that allowed to use only one event to fire an event both for touch and mouse will not be available in Chrome. Chrome developers may have some good arguments for that but from my point of view it means more work and more costs for clients.


After tons of debate and discussion, with lots of great input from our friends on the IE, Firefox and Safari teams, we've decided that incrementally extending our existing input APIs (see issue 404128) is a better path forward for blink (and, we believe, the web) than adopting pointer events. See a summary of our position here: https://docs.google.com/a/chromium.org/presentation/d/1qRqLKQjOnGgrM-UkMAb2RH6mQCFQHk8R01s5qvjm2Po/edit#slide=id.g355c5631f_134

Very briefly, pointer events has 3 main drawbacks relative to the alternative: 1) Mobile-first web:Pointer events would likely never supplant touch events on the web (especially without support from Safari). Since touch events are here to stay, supporting another largely redundant input model has a high long-term complexity cost on the web platform. 2) Performance:The hit testing model required by pointer events imposes a non-trivial performance penalty (hit test on every movement event) that neither Android, iOS or touch events has. We're not willing to add any feature that increases the web's performance disadvantage relative to native mobile platforms. 3) Richness:Pointer events requires that scrolling and event handling are mutually exclusive. This precludes some UI effects which are common on on mobile platforms (eg. pull to refresh). Recently strong developer feedback has lead us to change Chrome in the opposite direction here - enabling event handling while scrolling (see issue 293467 ). We're committed to working in the web standards community to improve input on the web, and we especially value the relationship we've recently built up with the IE team here. Despite this difference in technical opinion on what's best for the web, I'm optimistic that we'll still make good progress together. 

Update (26.03.2015):

There is a feedback from Chrome saying that it's possible that the pointerEvents are going to be implemented after all.

https://twitter.com/ChromiumDev/status/580764127691411456
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/ODWmcKNQl0I

Great news!

3 comments:

  1. Sometime few educational blogs become very helpful while getting relevant and new information related to your targeted area. As I found this blog and appreciate the information delivered to my database.ทำเว็บไซต์

    ReplyDelete
  2. This is genuinely an awesome read for me. I have bookmarked it and I am anticipating perusing new articles. Keep doing awesome!
    Web Development

    ReplyDelete
  3. Wonderful goods from you, man. I’ve understand your stuff previous to and you’re just too magnificent. I actually like what you’ve acquired here, certainly like what you are stating and the way in which you say it. You make it enjoyable and you still take care of to keep it wise. I cant wait to read much more from you. This is really a tremendous site. PSD to HTML

    ReplyDelete