Re:Breaking down a ripple animation in JavaScript
by franciscop on Thursday August 19, 2021 @07:41PM
(#28240695)
Probably because requestAnimationFrame is much better than setTimeout, AND requestAnimationFrame is supported even by IE10 so there's absolutely no need for a fallback. Also no, setTimeout is not more reliable than setInterval in many situations.
[ Parent
| on HN ]
Re:Breaking down a ripple animation in JavaScript
by beebeepka on Friday August 20, 2021 @02:09PM
(#28249396)
Did I not day FALLBACK? Oh, I did but I am getting downvoted and mansplained for pointing that out a simple fact.
RAF also stops executing when tab is inactive. Sometimes we don't want our loop halted and that's where setTimeout comes in as the better alternative to setInterval.
Re:Breaking down a ripple animation in JavaScript
by franciscop on Friday August 20, 2021 @03:42PM
(#28250524)
This is the perfect example of why it says not to ask why you were downvoted in the FAQ, and the last time I try to help. You literally asked, I just tried to give a plausible explanation. Instead you rant back, scream and insult those literally answering your question. Not the right behavior for HN.
Re:Breaking down a ripple animation in JavaScript
by beebeepka on Friday August 20, 2021 @08:01PM
(#28252756)
I provided a real world example that you haven't considered before.
Your condescending responses are hardly genuine attempts at finding a plausible explanation for me being downvoted by people who can't think that pointing out thing A is better than thing B even though thing C exists and is the correct approach most of the time.
Re:Breaking down a ripple animation in JavaScript
by qweqwweqwe-90i on Thursday August 19, 2021 @09:07PM
(#28241270)
No one should bother supporting IE now.
Re:Breaking down a ripple animation in JavaScript
by forgotmypw17 on Thursday August 19, 2021 @10:17PM
(#28241691)
I strongly disagree. If you can't be bothered to write resilient code, that's your choice, but don't speak for me on what I should and shouldn't support.
Re:Breaking down a ripple animation in JavaScript
by tomxor on Friday August 20, 2021 @09:22AM
(#28245612)
Supporting IE !== "writing resilient code"
If anything your code will be much worse for it and likely to contain more bugs.
Re:Breaking down a ripple animation in JavaScript
by forgotmypw17 on Saturday August 21, 2021 @11:47PM
(#28262695)
Your code could also just be simpler and not include bug-prone ways of writing.
For each browser you add support for, x more browsers and access limitations you've never even heard of also become supported.
Re:Breaking down a ripple animation in JavaScript
by franciscop on Friday August 20, 2021 @11:26AM
(#28247135)
At 2.3% in Japan, and a much higher percentage in some specific industries there like healthcare, some people probably might be bothered supporting IE. Not me or most people though: