What is the meaning of [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event in WordPress

Viewed 2476

My WordPress site got some violations.

[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive.

[Violation] 'DOMContentLoaded' handler took 55ms

[Violation] Forced reflow while executing JavaScript took 52ms

Theme Ari version 1.2

1 Answers

If you can access or modify your code, just use highly flexible and configurable passive-events-support package to debug and make event listeners passive without touching 3rd party source code.

See this answer on similar issue: https://stackoverflow.com/a/70811715/2333299

For me, this package fixed all the warnings cause by materialize and jquery. Hope it helps you too.

Related