Chalarangelo/30-seconds-of-code

passive-scroll-listener-performance has obsolete/incorrect advice

rebelmusic opened this issue · 2 comments

@rebelmusic Hi there! Thank you for raising this issue. The use of { passive: true } in a scroll event listener is related to optimizing browser performance. It indicates that the listener won't prevent default scrolling behavior.
If your code inside the listener doesn't include actions that prevent default behavior, like event.preventDefault(), then using { passive: true } might be unnecessary. Browsers may interpret it differently, and testing in your specific context will help decide if it's beneficial.

@Grenish is actually correct in his answer. Thanks everyone for your patience. I'm closing this as wontfix, due to the advice being correct.