There are micro- and macro- task queues in the JavaScript runtime.
setTimeout uses the macrotask queue.
setImmediate in IE11 presumably uses the microtask queue?
process.nextTick uses the microtask queue.
But setImmediate is not implemented in any other browser (and won't be AFAIK).
And process.nextTick is Node only.
Promises use the micro task queue. Could Promise therefore be leveraged to provide setImmediate like functionality in non IE browsers?
MutationObserverAPI in the browser.