-
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
Switch to MutationObserver #198
Conversation
…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).
}, false); | ||
|
||
return function() { | ||
el.setAttribute('x', 'x'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this works multiple times? The 'x' attribute doesn't have to change its value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently, yeah. I've run some tests in Chrome and it works. I plan to let Travis run the full gamut of tests on all platforms when this lands in dev as well. Also, this is how RSVP implements it
…hat it is still a problem, we can add it back easily enough. The webkit ticket appears to have been closed quite a while ago: Jan 2013.
Ok, I slimmed the MO branch down by removing the unload workaround. |
A couple nice benefits of this approach:
One obvious downside:
|
Combination of IE10 mobile + setTimeout concerns me. |
Merging after more discussion with @unscriptable, and in light of the fact that |
Switch to MutationObserver to workaround IE10 setImmediate/MessageChannel/postMessage bug
All green on Travis and Saucelabs tests. At least we know we haven't broken the world :) |
👍 |
This drops
setImmediate
andMessageChannel
support, relying primarily onprocess.nextTick
for all Node versions, and addingMutationObserver
support as the "fast" browser scheduler. Vert.x support is unchanged, and everything falls back tosetTimeout
when no fast option is detected.Definitely looking for feedback.
Fix #197