Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setImmediate() with _.defer() #466

Closed
jareware opened this issue Feb 9, 2012 · 2 comments
Closed

setImmediate() with _.defer() #466

jareware opened this issue Feb 9, 2012 · 2 comments

Comments

@jareware
Copy link

jareware commented Feb 9, 2012

Any plans on delegating to window.setImmediate() where available in _.defer()..?

https://developer.mozilla.org/en/Document_Object_Model_(DOM)/window.setImmediate
http://ie.microsoft.com/testdrive/Performance/setImmediateSorting/Default.html

Would match the documented use case of "Defers invoking the function until the current call stack has cleared, similar to using setTimeout with a delay of 0" though it's perhaps not Underscore's place to start shimming for experimental browser features.

@domenic
Copy link

domenic commented Feb 9, 2012

Also see NobleJS/setImmediate for a cross-browser shim.

@jashkenas
Copy link
Owner

Yes, but I think only when it has a bit more browser support. Looking in: https://github.com/NobleJS/setImmediate/blob/master/setImmediate.js ... it doesn't seem to be available in a non-experimental/hacky way anywhere yet. When browsers start having it as window.setImmediate, we'll start delegating to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants