-
Notifications
You must be signed in to change notification settings - Fork 594
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
Change asap mutation observer implementation to touch text node #2
Conversation
Opposed to setting attribute to the same value which may not trigger a mutation on buggy browsers or with a MutationObserver polyfill. Hat tip to Polymer microtask.js https://github.com/Polymer/platform-dev/blob/master/src/microtask.js
Looks good to me, but this polyfill is based on https://github.com/tildeio/rsvp.js/, and they'd benefit from the change too. I landed a commit over there a couple of days ago, once you land this I'll merge them in here and ship a new version. Regarding the patch:
I'll leave this open until I merge from rsvp |
-1. This is working as designed. When you use a MutationObserver polyfill, you explicitly opt in to flushing the queue yourself. If you don't flush the queue, then no promise handlers should fire. When you flush the queue, they should fire. |
Wait. I didn't understand the change. So the MutationObserver polyfill is just buggy, and only requires explicit flush of the queue when you edit attributes? Well, I guess working around that bug is less bad. But why not submit a pull request to polymer to fix their polyfill to not trigger the bug in the first place? |
Its not practically unfixable since |
Doesn't onpropertychange fire? Meh. I'm sure the polymer folks have already looked into this. Seems fine. Sorry for the initial negativity. |
@domenic can we confirm the polymer folks have looked into this? (I am not quite sure how they would work around this) |
@jakearchibald if you're just going to resync rspv.js source, I can close this. |
Changes went into rsvp.js, have been merged, new version (0.1.1) released with the changes \o/ @josh many thanks for this! |
Pretty cool, I didn't realize RSVP was used as the polyfil. Keep me posted if you have any issues/ideas. |
Great isn't it? Looks like I did loads of work, but really it was just a few hours of deleting, renaming & making sure inheritance worked as spec'd. (although I do point out the link in the first link of the readme, I'm not a total cretin) |
…4 like in master
…4 like in master
…4 like in master
…4 like in master
…4 like in master
…4 like in master
…4 like in master
…4 like in master
[stable10] Change stefanpenner/es6-promise#2.3.0 to components/es6-promise#v4.2.4
Alternative PR to #1 as suggested by @azakus.
Opposed to setting attribute to the same value which may not trigger a mutation on buggy browsers or with a MutationObserver polyfill.
Hat tip to Polymer microtask.js
https://github.com/Polymer/platform-dev/blob/master/src/microtask.js
/cc @jakearchibald @azakus