matter-js
matter-js copied to clipboard
Passive Event Listeners
Apparently, my game is throwing errors saying
[Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
I did some research and turns out this can be fix this by adding the passive
flag to document.addEventListener
for some browsers.
do you have a sample code?
take care
@AliaNeedsHelp I can't reproduce this on any of the examples, can you share the code that shows the issue?
ya @AliaNeedsHelp you need to show your code