2 ms·
Are you talking about Pointer Events versus Touch Events? Edge supports both (and has for some time). IE supports only Pointer Events. (There is a polyfill for
by WorldMaker 8y ago
Are you talking about Pointer Events versus Touch Events?
Edge supports both (and has for some time). IE supports only Pointer Events. (There is a polyfill for Touch Events on IE: https://github.com/WebReflection/ie-touch https://github.com/WebReflection/ie-touch)
https://developer.mozilla.org/en-US/docs/Web/API/Touch_events#Browser_compatibility https://developer.mozilla.org/en-US/docs/Web/API/Touch_event...
https://caniuse.com/#feat=pointer https://caniuse.com/#feat=pointer
https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events https://developer.mozilla.org/en-US/docs/Web/API/Pointer_eve...
Both are W3C recommended standards. Pointer Events has more capabilities, and an easier abstraction for multi-modal input (ie, mouse and touch, or touch and pen). So I often see Pointer Events recommended over Touch Events if you can use Pointer Events. (React recently moved to recommending Pointer Events, as one example.)
The big reason not to use Pointer Events is that Safari/WebKit has lagged far behind on Pointer Event adoption (it is finally in experimental preview in Safari, years after Firefox and Chrome/Blink, and seems to be part of the increasing Blink/WebKit split). There is a Pointer Event Polyfill for Safari (and other older browsers that support Touch Events but not Pointer Events): https://github.com/jquery/PEP https://github.com/jquery/PEP