Is there a performance impact when using a `window.scrollTo` polyfill?

Question

Grade: Education Subject: Support
Is there a performance impact when using a `window.scrollTo` polyfill?
Asked by:
70 Viewed 70 Answers

Answer (70)

Best Answer
(406)
Generally, the performance impact of `window.scrollTo` polyfills is minimal. Modern polyfills are optimized to closely mimic the native function's behavior. However, using a very large or poorly optimized polyfill *could* potentially impact performance. It's always a good practice to test your code with the polyfill to ensure it doesn't introduce any noticeable slowdowns, particularly on mobile devices.