-
Notifications
You must be signed in to change notification settings - Fork 396
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 and MessageChannel broken on IE10 #197
Comments
It'd be nice if we could detect the bug rather than sniff the browser, but it seems unlikely that we'll be able to do this, unfortunately. Regardless, we should add a work-around in poly.js. Not sure what to do about when.js. |
Not sure what to do about when.js since MessageChannel is also affected. @plaa, do you have a link to the bug you filed with Microsoft? |
the bug report: https://connect.microsoft.com/IE/feedback/details/801823/setimmediate-and-messagechannel-are-broken-in-ie10 tracking this issue in RSVP: tildeio/rsvp.js#115 |
Wow, just wow. So setIMMEDIATE is a complete lie :) Thanks for the report and very detailed blog post, @plaa! Thanks for the links to the related issues, @plaa and @stefanpenner. I'm sure at some point MS will fix this, but who knows how long that will take to propagate to Win 8 mobiles in the wild, so yeah, we need to do something relatively quickly. One thought is that we could drop support for That leaves us with what to do on IE10. Once we drop Perhaps Falling all the way back to Here's a potential plan:
What do you guys think? Other alternatives? |
…eChannel in favor of MutationObserver. This forces falling back to setTimeout in IE < 11, and Safari < 6 (see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver#Browser_compatibility).
…eChannel in favor of MutationObserver. This forces falling back to setTimeout in IE < 11, and Safari < 6 (see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver#Browser_compatibility).
So what's the fallback for IE(6-)8? Should we look at <script> On Sat, Sep 21, 2013 at 6:50 PM, Brian Cavalier notifications@github.comwrote:
|
Hm.... this feels like it's going to turn into a game of whack-a-mole. Until JavaScript has a formal scheduler, this could get crazy. I wonder if browsers are always going to exhibit unreliable behavior under various high-cpu and/or low-memory situations. Maybe we should just leave when.js at something simple, say setTimeout and setImmediate, and leave the setImmediate shims do the whack-a-mole? |
Yeah, it's
Yeah, it's definitely an arms race + whack-a-mole, and that sucks. As of #198, ignoring vert.x for a minute, we'd support 2 "fast" scheduler options for "common" platforms: I'd rather not deal with
That's an option. If we went that route, I think we'd need to support:
That's mostly the situation we had before we introduced |
my fork of setImmediate is up to date (includes mutation, dosn't include setImmediate) and is an AMD module |
@calvinmetcalf Nice, thanks for the update. |
@calvinmetcalf Quick q: Does your fork detect/workaround the IE10 |
yes, it currenlty does not look for global setImmediate and prefers postMessage to MessageChannel |
@calvinmetcalf Ah, I see, thanks. You don't worry about actually polyfilling |
yeah more of a shim really |
postMessage also suffers from the same bug: http://sampo.kapsi.fi/setImmediate/testPostMessage.html Seems like there’s no fully functional zero-time timeout on IE10. |
@plaa wow, thanks. I think I'm ok with IE10 getting relegated to |
if I remember correct requestAnimationFrame is similar to setTimeout @plaa if you use setTimeout twice in that example does it still break? |
setTimeout works properly: http://sampo.kapsi.fi/setImmediate/testSetTimeout.html |
postMessage works fine in IE 9, and IE11 has mutation observer, meaning if we set the use order to be edit to be clear by works fine in IE 9 I mean works exactly as badly as the 2 setTimeouts example. |
ROFL! So, does mean there's effectively no advantage at all to using |
sorry by badly i meant that as the dom grew bigger in that demo it caused the browser to slow down and eventually melt down. Good or bad wasn't referring to how the promises worked, post message worked very well in the quasi real world perf example for IE9 (catiline and lie both use it as a fallback but others don't) |
onreadystatechange seems to work: http://sampo.kapsi.fi/setImmediate/testOnReadyStateChange.html On WP8 the two functions are called alternately, on IE10 desktop only runOnReadyStateChange is ever called. It seems runOnReadyStateChange is called at the end of the current tick, so IE never reaches the next tick to run the setTimeout callback. (After a few seconds the browser melts down, probably due to the ever-increasing log.) |
what happens with |
your updating the dom before you reset the queue for |
This is in 6a7755e. We could release it in 2.4.1. Any concerns before we do? |
Merged to dev and master. Will go out in 2.4.1 soon. |
There's a bug in IE10 that makes setImmediate and MessageChannel practically useless on IE10 Mobile, and somewhat unreliable on IE10 Desktop. Simply adding a spin.js spinner on our login page caused Q promises to stop working on IE10 Mobile.
I wrote a detailed description of the bug in my blog: http://codeforhire.com/2013/09/21/setimmediate-and-messagechannel-broken-on-internet-explorer-10/
As a workaround, we had to disable both setImmediate and MessageChannel in order to get Q promises to work:
window.setImmediate = undefined;
window.MessageChannel = undefined;
when.js seems to use setImmediate if present, so it's affected as well. See kriskowal/q#396
The text was updated successfully, but these errors were encountered: