DOM Promise and Promises/A+ implementation