7 ms·
Blink won’t implement pointer events
- aikah 12y agoIf it becomes a standard I guess they will reconsider their choice. We are in a weird era where HTML5/web apis kind of succeeded ,making plugins almost obsolete, yet i'm still not sure 5/10 years from now,vendors will still be on that same line.The temptation of implementing proprietary APIs is still huge. Touch events for instance are a still proprietary API.
- matthewmacleod 12y agoTouch events for instance are a still proprietary API. It's a W3C recommendation http://www.w3.org/TR/touch-events/ http://www.w3.org/TR/touch-events/
- icantthinkofone 12y agoIt won't become a standard unless there are at least two complete implementations in browsers.
- gtjrossi 12y agoPointer Events is a Candidate Recommendation at the W3C http://www.w3.org/TR/pointerevents/ http://www.w3.org/TR/pointerevents/ It has 2 implementations (Firefox has implemented in a special branch and is working to port it to their main codebase) and a near complete test suite. Thus it's expected to reach the final Recommendation state soon. So I don't think the standardization status will change Google's opinion here. (I edit the PE spec and work on IE)
- matthewmacleod 12y agoThis is interesting, because I'm pretty sure Microsoft is going to go full steam ahead with pointer events. Indeed, they're the only major vendor of a device that supports both mouse and touch (finger AND stylus) events – it's going to be super important to handle those events well. I'm not totally convinced by the Blink argument – the fact that "touch events are here to stay" is irrelevant, given the unifying nature of pointer events; "fast by default" is a noble goal, but must be a trade-off with functionality; and the whole event-handling-scrolling mess doesn't seem like enough of a deal breaker to preclude tweaks to the spec to fix it. That said, I'm sure they've had extensive discussions about it and made this decision for a good reason - I hope they now push ahead hard with an alternative solution to these problems.
- dmethvin 12y agoThe unifying nature of pointer events is what makes them so important for the future. Otherwise you have to implement multiple pointer models on a device that provides more than one, or try to simulate one from the other which becomes a mess of lies that the app developer has to sort through. I've already worked with a couple of companies that have been bitten by assuming a device has either touch or mouse, but not both. They had code to the effect of `if ( touchstart in document ) { attach touch events } else { attach mouse events }` but then they ran into Chrome on a Windows 8 system with a touch screen. Whoops. Now their site only works if you touch the screen. If you think this is "only a problem on those crazy Windows 8 notebooks" then you're not thinking ahead to systems that will use a Kinect, eye tracking, or some other advanced technique to implement pointers. Devs are really going to hate it when those interesting input methods are sliced and diced into mouse or touch (or God forbid BOTH) in order to shove it into Apple's 2007 vision of a web page input world.
- randomfool 12y agoThere is already the need to support alternate input mechanisms in the form of accessibility and keyboard navigation. Creating UI widgets that work well everywhere is a non-trivial task that is frequently underestimated. What this really highlights is the need for high quality UI toolkits which abstracts these details. If a developer is complaining about supporting mouse and touch, then they're most likely missing out on many more details and should be using some pre-built components instead.
- fidotron 12y agoPeople used to complain about mobile device fragmentation, but the web is now looking more fragmented than at any point since IE3 vs Netscape, and whoever else decided to chuck together an excuse for a browser and release it. The approach where all the vendors are ignoring each other as much as possible while pursuing their own improvements has created a giant mess. What is strangling the situation is there is no consistent vision of what they're actually trying to achieve, so the resulting platform is incoherent, and thus absolutely joyless to work with.
- matthewmacleod 12y agoI'd flip it around and say the opposite, myself! Browser vendors generally seem to be working pretty closely to build a consistent platform. While they've all got their own priorities, as ever, there's lots of collaboration in many areas. We've got cross-platform graphics, WebGL is almost useable, CSS support is good… and so on. Compared to a few years ago, when we had to build sites that scaled from IE6 all the way to the iPhone, the web is much more uniform and pleasant to work with.
- bellerocky 12y ago> but the web is now looking more fragmented than at any point since IE3 vs Netscape Is there really need to engage in hyperbole? The situation is bad enough without having to resort to exaggerations for effect. The IE6 lack of support for transparent pngs and a host of other incompatibilities also fragmented the web and in effect the situation is much better now because most sites just work in IE 11 even though developers only tested in Chrome and or Firefox. This is true unless you're using features that haven't made it through the standardization process yet like webrtc. That sites "just work" in the latest version of IE without testing wasn't the case 5 years ago, or even 3 years ago.
- andybak 12y agoI think you've reached a slightly perverse conclusion. From the source: >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. Sounds to me like the Blink time is trying to use their say to reduce fragmentation and they've taken the side of practicality. Rough consensus and running code indeed. The other points seem equally sensible to me (at least at first glance) - and a long way from "ignoring each other as much as possible while pursuing their own improvements"
- realusername 12y agoOne thing which makes me sad is the lack of structure of the Javascript API. Everything is now built using Javascript and the JS VM is not following any UNIX principles in its implementation. I would really like to have a UNIX-like JS API. A small example: let's say that you want to redirect the error output to the standard output. Since everything is a file descriptor on UNIX, you can just call dup2(2) and this won't have any repercussion on other parts of the program. You can also redirect any error to a file just by using this on a file descriptor you got from open (2). But in Javascript, everything is different, you have to redeclare console.error and hope that this won't break anything if some library is doing exactly the same thing as you somewhere. This is also the same problem with XMLHttpRequest and various javascript APIs. (including the File and Blob API to read files on the browser).
- Bahamut 12y agoWhat you are talking about aren't JavaScript APIs, but browser APIs.
- reubenmorais 12y ago>Since everything is a file descriptor on UNIX, you can just call dup2(2) and this won't have any repercussion on other parts of the program. You chose an unfortunate example. From the dup2 documentation: The object referenced by the descriptor does not distinguish between fildes and fildes2 in any way. Thus if fildes2 and fildes are duplicate references to an open file, read(2), write(2) and lseek(2) calls all move a single pointer into the file, and append mode, non-blocking I/O and asynchronous I/O options are shared between the references. If a separate pointer into the file is desired, a different object reference to the file must be obtained by issuing an additional open(2) call. The close-on-exec flag on the new file descriptor is unset.
- evmar 12y agoAnd on top of that, you have to worry about CLOEXEC if your process can fork, so you need to consider using dup3.
- tlrobinson 12y ago
- underwater 12y ago"Touch events are here to stay". Ugh, that's such a defeatist attitude. And it seems unfounded. Most developers use some form of abstraction on top of native events, such as jQuery or React. I wish we could move towards a model where browser vendors would expose low level APIs and let libraries implement simple interfaces on top of them. At the moment we end up having to write browser-specific hacks that "guess" the state of the world based on weird heuristics and browser sniffing: https://github.com/facebook/react/blob/master/src/browser/eventPlugins/BeforeInputEventPlugin.js#L125 https://github.com/facebook/react/blob/master/src/browser/ev...
- jvilk 12y ago> I wish we could move towards a model where browser vendors would expose low level APIs... You might find this academic paper from James Mickens interesting, which explores this exact idea in detail: http://sigops.org/sosp/sosp11/current/2011-Cascais/printable/16-mickens.pdf http://sigops.org/sosp/sosp11/current/2011-Cascais/printable...
- malandrew 12y agoWhat we want/need is basically this: http://extensiblewebmanifesto.org/ http://extensiblewebmanifesto.org/ The problem for Google is that an extensible web is a threat t their business model based around search. This is why they are so adamant about force pushing web components and polyfills. It's the least offensive (and least compute intensive) approach to their web crawler. It's much easier and cheaper for them (as a business) to get everyone to adopt a half-baked and half-thought out standard that allows their crawler to extract content from a page without having to execute javascript to understand what is there. With the right APIs, a JavaScript rich web can still be an accessible web for the physically impaired. OS X is proof that this possible. However, this approach makes it far far more expensive for web crawlers at scale since it's not as simple as just parsing a document. Forcing everything into a cheaply parseable document is just Google externalizing their costs on the rest of society. Every decision made for blink needs two be viewed with two lenses: (1) what does this change mean for the Chrome web browser?; and (2) what does this change mean for the Google web crawler? At the end of the day, those two are closely related.
- underwater 12y agoI hadn't heard of the performance implications of pointer events before. In my experience Internet Explorer is actually really incredible when it comes to touch performance. If you have a touch-enabled Windows device, open up t.msn.com and try swiping through the carousel. It's powered by -ms-scroll-snap-points and feels really good - even on mobile devices. It beats hand-rolled JavaScript scrolling implementations hands down. As a developer, being able to add `pointer-events: none` to CSS is amazing when compared to adding and removing touch event listeners in iOS to avoid blocking the so the scroll thread.
- robin_reala 12y agoFor what it’s worth pointer-events:none; is a completely different thing: it’s cribbed from SVG and has nothing to do with MS’s spec.
- jaffathecake 12y agoYep, -ms-scroll-snap-points is also a different thing.
- zghst 12y agoSeeing that Google doesn't want to add anything to its browser that is not essential and will not penalize performance, this was obviously not going to make the cut. Pointer events would be nice, but using a polyfill isn't so bad. Even if they implemented pointer events, we would still have to implement a polyfill for backwards and cross platform compatibility. For those of who complain of standards, look at the CSS Regions standard. It's dead and the only browser that has a strong implementation of it is Safari. Other examples of non implemented or partially implemented standards by the browsers: SVG animations, Server sent events, CSP, CSS filters, CSS Images Values and Replaced Content (i.e. cross-fade() images), Intrinsic Sizing, Media Capture and Streams, CSS Masking and Clipping, Web Speech API, CSS Clip paths, User Timing API, the list is endless. Not to mention that IE and Firefox seem to be very slow at implementing any CSS styling related properties like CSS filters, masking, shapes, 3D CSS transforms (Firefox struggled for a bit and now IE is 'struggling' to implement them fully)
- mcav 12y ago(although server-sent-events are supported by just about everything except IE: http://caniuse.com/eventsource http://caniuse.com/eventsource )
- panzi 12y agoGiven that IE 10+ supports web sockets I don't really see the need for server sent events. What can you do with server sent events that you cannot do with web sockets? I guess one could deprecate SSE in favor of WS.
- chc 12y agoIt's not what you can do, but what you have to do. Websockets are to Server-Sent Events as jet planes are to wheelbarrows. Yes, the stuff jet planes can carry is a superset of the stuff wheelbarrows can carry, but the cost is greater and it ends up being a suboptimal in many cases where you'd want to use a wheelbarrow.
- 12y ago
- oatmealsnap 12y agoCan someone explain what these pointer events are? I assume this is different from the CSS property already being used...
- cobalt 12y agohttps://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-eve...
- earp 12y agoThat's the CSS property already being used. The controversial specification is at https://dvcs.w3.org/hg/pointerevents/raw-file/tip/pointerEvents.html https://dvcs.w3.org/hg/pointerevents/raw-file/tip/pointerEve...
- earp 12y agoI wonder what will happen with the Polymer polyfills for WebComponents, a technology that Safari also hasn't declared intent to implement. And then I wonder what will happen with the polyfill for PointerEvents that already comes bundled with Polymer, which by the way works great in Safari. But most of all, I wonder what this all means for Polymer PointerGestures, which is exactly what we need around here: https://github.com/Polymer/PointerGestures https://github.com/Polymer/PointerGestures. I'm starting to think that this may all go the way of all those technologies with an X in it's acronmym, which are largely forgotten today because of similar reasoning from Google's lobbyists. You have to assume that the future of these things is longer than the past. That's why you should never put politicians in charge of it.
- dfreedm2 12y agoI actually replaced PointerEvents use in Polymer with https://github.com/polymer/polymer-gestures/ https://github.com/polymer/polymer-gestures/ a couple of months ago: https://groups.google.com/forum/#!topic/polymer-dev/ba4aDyOozm8 https://groups.google.com/forum/#!topic/polymer-dev/ba4aDyOo...
- earp 12y agoGood info. With no specification to back it up, I might go back to my hand-rolled gestures-style library. I retired it because of imminent standardization, but at this point, it seems as likely to be standardized as everything else. I promise to take PolymerGestures for a spin, though, since I was happy with the coding going into those libs now deprecated. Thanks!
- based2 12y agohttp://www.reddit.com/r/programming/comments/2dq1bl/google_to_drop_microsoftdesigned_touch_web_spec/ http://www.reddit.com/r/programming/comments/2dq1bl/google_t...