无法阻止被动事件监听器中的Default(Chrome控制台错误)

时间:2019-05-24 08:51:55

标签: javascript google-chrome console preventdefault

在开发人员控制台中出现错误。因此,该站点的滚动非常缓慢。 参见https://www.chromestatus.com/features/6662647093133312

https://i.stack.imgur.com/Tn1b9.png

发生错误的行在这里:

!function(){function e(){var e =!1; e && c(“ keydown”,r),v.keyboardSupport &&!e && u(“ keydown”,r)} function t(){if(document。 body){var t = document.body,n = document.documentElement,o = window.innerHeight,r = t.scrollHeight; if(S = document.compatMode.indexOf(“ CSS”)> = 0?n:t, w = t,e(),x =!0,top!= self)y =!0;否则if(r> o &&(t.offsetHeight <= o || n.offsetHeight <= o)){var a = !1,i = function(){a || n.scrollHeight == document.height ||(a =!0,setTimeout(function(){n.style.height = document.height +“ px”,a =! 1},500))}; if(n.style.height =“ auto”,setTimeout(i,10),S.offsetHeight <= o){var l = document.createElement(“ div”); l.style .clear =“ both”,t.appendChild(l)}} v.fixedBackground || b ||(t.style.backgroundAttachment =“ scroll”,n.style.backgroundAttachment =“ scroll”)}}函数n(e ,t,n,o){if(o ||(o = 1e3),d(t,n),1!= v.accelerationMax){var r = + new Date,a = rC; if(a1 &&(i = Math.min(i,v.accelerationMax),t * = i,n * = i)} C = +新日期} if(M.push({x:t,y:n,lastX:0> t? .99:-。99,lastY:0> n?.99:-。99,start:+ new Date}),! T){var l = e === document.body,u = fu nction(){for(var r = + new Date,a = 0,i = 0,c = 0; c = v.animationTime,h = f?1:d / v.animationTime; v.pulseAlgorithm &&((h = p (h)); var m = s.xh-s.lastX >> 0,w = s.yh-s.lastY >> 0; a + = m,i + = w,s.lastX + = m,s.lastY + = w,f &&(M.splice(c,1),c –)} l?window.scrollBy(a,i):( a &&(e.scrollLeft + = a),i &&(e.scrollTop + = i)),t | | n ||(M = []),M.length?N(u,e,o / v.frameRate + 1):T =!1}; N(u,e,0),T =!0} }函数o(e){x || t(); var o = e.target,r = l(o); if(!r || e.defaultPrevented || s(w,“ embed”)||| s (o,“嵌入”)&& /。pdf / i.test(o.src))返回!0; var a = e.wheelDeltaX || 0,i = e.wheelDeltaY || 0;返回a || i | |(i = e.wheelDelta || 0),! v.touchpadSupport && f(i)?! 0:(Math.abs(a)> 1.2 &&(a * = v.stepSize / 120),Math.abs(i) > 1.2 &&(i * = v.stepSize / 120),n(r,-a,-i),避免使用e.preventDefault())}函数r(e){var t = e.target,o = e。 ctrlKey || e.altKey || e.metaKey || e.shiftKey && e.keyCode!== H.spacebar; if(/input|textarea|select|embed/i.test(t.nodeName)|| t.isContentEditable | | e.defaultPrevented || o)返回!0; if(s(t,“ button”)&& e.keyCode === H.spacebar)返回!0; var r,a = 0,i = 0,u = l (w),c = u.clientHeight; switch(u == document。 body &&(c = window.innerHeight),e.keyCode){case H.up:i = -v.arrowScroll; break; case H.down:i = v.arrowScroll; break; case H.spacebar:r = e。 shiftKey?1:-1,i = -rc.9; break; case H.pageup:i = .9 * -c; break; case H.pagedown:i = .9c; break; case H.home:i = -u.scrollTop; break; case H.end:var d = u.scrollHeight-u.scrollTop-c; i = d> 0?d + 10:0; break; case H.left:a = -v.arrowScroll ; break; case H.right:a = v.arrowScroll; break; default:return!0} n(u,a,i),e.preventDefault()}函数a(e){w = e.target}函数i(e,t){for(var n = e.length; n –;)E [A(e [n])] = t;返回t}函数l(e){var t = [],n = S.scrollHeight; do {var o = E [A(e)]; if(o)return i(t,o); if(t.push(e),n === e.scrollHeight){if(! y || S.clientHeight + 100?1:-1,t = t> 0?1:-1,(kx!== e || ky!== t)&&(kx = e,ky = t,M = [],C = 0)}函数f(e){if(e){e = Math.abs(e),D.push(e),D.shift(),clearTimeout(z); var t = h(D [0],120)&& h(D [1],120)&& h(D [2],120); return!t}}函数h(e,t){return Math.floor(e / t) == e / t}函数m(e){var t,n,o; return e = v.pulseScale,1> e?t = e-(1-Math.exp(-e)):( n = Math .exp(-1),e- = 1,o = 1-数学.exp(-e),t = n + o *(1-n)),t * v。脉冲归一化}函数p(e){返回e> = 1?1:0> = e?0:(1 == v.pulseNormalize &&(v.pulseNormalize / = m(1)),m(e))} var w ,g = {frameRate:150,animationTime:500,stepSize:120,pulseAlgorithm:!0,pulseScale:8,pulseNormalize:1,accelerationDelta:20,accelerationMax:1,keyboardSupport:!0,arrowScroll:50,touchpadSupport:!0 ,fixedBackground:!0,已排除:“”},v = g,b =!1,y =!1,k = {x:0,y:0},x =!1,S = document.documentElement,D = [120,120,120],H = {左:37,上:38,右:39,下:40,空格键:32,上一页:33,下一页:34,结束:35,首页:36},v = g,M = [],T =!1,C = + new Date,E = {}; setInterval(function(){E = {}},1e4); var z,A = function(){var e = 0; return function(t){return t.uniqueID ||(t.uniqueID = e ++)}}(),N = function(){返回window.requestAnimationFrame || window.webkitRequestAnimationFrame || function(e,t,n){window .setTimeout(e,n || 1e3 / 60)}}(),K = / chrome / i.test(window.navigator.userAgent),L = null; document.createElement(“ div”)中的“ onwheel”吗? L =“ wheel”:文档中的“ onmousewheel”。createElement(“ div”)&&(L =“ mousewheel”),L && K &&(u(L,o),u(“ mousedown”,a),u(“加载”,t))}(); }

有人看到此修复程序吗?

0 个答案:

没有答案