4 ms·
Probably because requestAnimationFrame is much better than setTimeout, AND requestAnimationFrame is supported even by IE10 so there's absolutely no need for a f
by franciscop 5y 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.
- qweqwweqwe-90i 5y agoNo one should bother supporting IE now.
- forgotmypw17 5y agoI 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.
- tomxor 5y agoSupporting IE !== "writing resilient code" If anything your code will be much worse for it and likely to contain more bugs.
- forgotmypw17 5y agoYour 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.
- franciscop 5y agoAt 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 https://twitter.com/FPresencia/status/1428359948182818836
- beebeepka 5y agoDid 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.
- franciscop 5y agoThis 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.
- beebeepka 5y agoI 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.