WebSite X5Help Center

 
Klaus G.
Klaus G.
User

Eventlistener  de

Author: Klaus G.
Visited 899, Followers 1, Shared 0  

Hallo KolAsim,

kannst du mal Prüfen ob dieser Eventlistener funktioniert ???

SEO Meldung: Verwendet keinen EventListener zur verbesserung der Scrollleistung

Oder hast du da was in Peto ???

Frohe Festtage

MCMACMASTER

<script>
require(['jquery'], function(jQuery) {
'use strict';
(function() {

jQuery.event.special.touchstart = {
setup: function( _, ns, handle ) {
this.addEventListener("touchstart", handle, { passive: !ns.includes("noPreventDefault") });
}
};

jQuery.event.special.touchmove = {
setup: function( _, ns, handle ) {
this.addEventListener("touchmove", handle, { passive: !ns.includes("noPreventDefault") });
}
};

jQuery.event.special.wheel = {
setup: function( _, ns, handle ){
this.addEventListener("wheel", handle, { passive: true });
}
};

jQuery.event.special.mousewheel = {
setup: function( _, ns, handle ){
this.addEventListener("mousewheel", handle, { passive: true });
}
};

jQuery.event.special.scroll = {
setup: function( _, ns, handle ){
this.addEventListener("scroll", handle, { passive: true });
}
};
}());
});
</script>

Posted on the
1 ANSWERS
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

Hallo, ... Entschuldigungfoot-in-mouth, ... dieser Code ist mir unbekannt, ich weiß nicht, was er tun soll, und ich habe keinen Touch-PC zum Experimentieren ...
... hallo und Frohe Ostern

.

Read more
Posted on the from  ‪ KolAsim ‪ ‪