From 32ea154947f95e4309c98922179a1ec81d687c9e Mon Sep 17 00:00:00 2001 From: tofulm Date: Thu, 4 Apr 2019 22:07:13 +0200 Subject: [PATCH] ajout passive : true sur touchstart, cf doc dans le script --- gamuSwipe.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gamuSwipe.js b/gamuSwipe.js index 14474e1..6471e27 100644 --- a/gamuSwipe.js +++ b/gamuSwipe.js @@ -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);