Javascript Google Maps API & non-passive event handlers

一曲冷凌霜 提交于 2019-12-08 15:09:27

问题


Recently Chrome started emitting the following warnings:

[Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

These are coming from the JavaScript Google Maps API code. I'm able to add {passive: true} to addEventListener() in my own code but don't know how to suppress the warning in Googles libraries?

来源:https://stackoverflow.com/questions/47799388/javascript-google-maps-api-non-passive-event-handlers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!