Hacker News new | ask | show | jobs
by franciscop 1762 days ago
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.
2 comments

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.

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.
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.

No one should bother supporting IE now.
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.
Supporting IE !== "writing resilient code"

If anything your code will be much worse for it and likely to contain more bugs.

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.

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:

https://twitter.com/FPresencia/status/1428359948182818836