-
Notifications
You must be signed in to change notification settings - Fork 46
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
Consider using Promise.prototype.then #54
Comments
We need to be a little careful with polyfills for Promise that use this library internally. |
Yeah, there could be something like this code to check that the Promise implementation is indeed native: if(typeof Promise !== "undefined" && Promise.toString().indexOf("[native code]") !== -1){
// it's native
} Shamelessly grabbed from Benjamin Gruenbaum |
FYI, there seems to be a bug in Firefox microtask scheduling using a resolved Promise, see https://bugzilla.mozilla.org/show_bug.cgi?id=1162013 |
On Chrome, |
There's a blog post about how using
Promise.then
is supposedly even faster than .nextTick.Given that we have stuff like io.js with Promise support and a lot of browser supporting it to, do you think it'd make sense to conditionally use this feature if it exists?
The text was updated successfully, but these errors were encountered: