Open toddreifsteck opened 9 years ago
I agree with you. I used to see setTimeout(0) for many times. Does anybody have statistical information?
See github search result -> https://github.com/search?l=javascript&o=desc&q=%22setTimeout%22&ref=searchresults&s=indexed&type=Code&utf8=%E2%9C%93
There are so many requestAnimationFrame and setImmediate polyfills.
The reason for setImmediate's creation is to provide an alternative to setTImeout(0) that has the behavior of having low priority. This allows web developers to run low priority callbacks which included a large subset of the existing setTimeout(0) use-cases.