jjzjj

molestiae

全部标签

javascript - 在解决控制台中的 [Violation] 警告时滚动 DIV 时防止页面滚动

起初这似乎是重复的问题回答here但还有更多问题需要弄清楚。在googlechrome控制台中给定[Violation]警告,我该如何解决?[Violation]Addednon-passiveeventlistenertoascroll-blocking'mousewheel'event.Considermarkingeventhandleras'passive'tomakethepagemoreresponsive.这是有效的代码片段,但带有上述[Violation]警告。$.fn.isolatedScroll=function(){this.on('mousewheelDOMMo