BackburnerJS / backburner.js

A rewrite of the Ember.js run loop as a generic microlibrary
MIT License
392 stars 80 forks source link

Use Promise microtask queue as first option. #362

Closed rwjblue closed 5 years ago

rwjblue commented 5 years ago

This change swaps the order so that Backburner will use Promises first then fallback to MutationObserver if Promise is not present (cough IE11 cough).

This makes debugging a bit nicer since it shows "Promise.then (async)" instead of "character data (async)"), and also ensures that we can more consistently target the right microtask queue.


This is the result of a longer debugging session where @stefanpenner (and I) determined that there is a difference between Safari and Chrome in how mutation observer microtasks and promise microtasks are queued.

lynchbomb commented 5 years ago

lgtm