📌  相关文章
📜  如何在 jquery "3.4.0" 中添加 make touchstart passive - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:51.877000             🧑  作者: Mango

代码示例1
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') });
            }
        };