An alias for the Promise
object representing an asynchronous operation.
It uses the native Promise
browser implementation if it is available. For older browsers with lack of Promise
support,
the ES6-Promise
polyfill is used.
See the Promise Browser Compatibility table
to learn more.
Refer to MDN Using Promises guide for
more details on how to work with promises.
NOTE: catch
and finally
are reserved keywords in IE<9 browsers. Use bracket notation instead:
promise[ 'catch' ]( function( err ) {
// ...
} );
promise[ 'finally' ]( function() {
// ...
} );