DOM Promises for browsers and node.js