3 ms·
Well, "should" isn't a great word in this context. Yes, animations probably should be in JavaScript, but you probably shouldn't do them in JavaScript right now
by untog 12y ago
Well, "should" isn't a great word in this context.
Yes, animations probably should be in JavaScript, but you probably shouldn't do them in JavaScript right now as they won't be hardware accelerated. The reason it works well in CSS is that you're setting a property and letting native code do the rest, whereas in JS you need to set a property in each requestAnimationFrame() call. Not good.