Pending promises. Untested - do not merge.
It further seems that Promises are not yet properly supported in all browsers (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
However, there are quite some libraries and their implementation is simple.