w3c / setImmediate

This repo defines an interface for web applications to flush the browser event queue and receive an immediate callback.
Other
3 stars 8 forks source link

setImmediate does not explain the setTimeout(0)'s prevalance problem #1

Open toddreifsteck opened 9 years ago

toddreifsteck commented 9 years ago

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.

furoshiki commented 9 years ago

I agree with you. I used to see setTimeout(0) for many times. Does anybody have statistical information?

furoshiki commented 9 years ago

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.