Jason Knight
Mar 19, 2022

--

I'd say the problem here isn't that you need to do nothing every other frame, it's that you're not grabbing the performance data that's passed as a parameter to your animationFrame handler.

Don't ignore that the expired time since the last frame is sent to your handler as an argument.

Either that or you're running it on a potato.

Though you mentioned the outdated outmoded "should only be used to sandbox advertisements" iframes...

--

--

Jason Knight
Jason Knight

Written by Jason Knight

Accessibility and Efficiency Consultant, Web Developer, Musician, and just general pain in the arse

Responses (1)