ajout passive : true sur touchstart, cf doc dans le script

This commit is contained in:
Christophe 2019-04-04 22:07:13 +02:00
parent b66747ea3a
commit 32ea154947

View file

@ -1,7 +1,10 @@
/*
* gamuSwipe v1.0.0 2019-01-31
* gamuSwipe v1.0.1 2019-04-04
* https://git.gamuza.fr/scripts/gamuswipe
*
* arg passive : true
* https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md
* https://developer.mozilla.org/fr/docs/Web/API/EventTarget/addEventListener
*/
function gamuSwipe(mon_id,handleswipe){
window.addEventListener('load', function(){
@ -14,7 +17,7 @@ function gamuSwipe(mon_id,handleswipe){
var touchobj = e.changedTouches[0];
dist = 0;
startX = touchobj.pageX;
}, false);
}, {passive: true});
//touchsurface.addEventListener('touchmove', function(e){
//}, false);