PolymerElements / iron-selector

Manages a list of elements that can be selected
32 stars 55 forks source link

Fix test depending on `async` and `observeNodes` callbacks being interleaved. #108

Closed bicknellr closed 8 years ago

bicknellr commented 8 years ago

Polymer.Base.async changes the text content of a node with an attached MutationObserver to get its callback called with microtask timing. Polymer.dom(...).observeNodes also uses a separate MutationObserver when available. Polymer.Base.async, because it only has one mutation observer, flushes all callbacks synchronously when its MutationObserver is called. So, all callbacks given to async occur before any other MutationObservers triggered after the first async call.

notwaldorf commented 8 years ago

Awesome! LGTM 🐳