Promise

Promise object constructor

object Promise(function executor);
executorfunctiona callback used to initialize the promise
objectthe promise object

Example

new scheduler.Promise(function(resolve, reject) {
    setTimeout(function(){
        resolve();
    }, 5000);
}).then(function(){
    alert("Resolved")
});

Details

The Promise object constructor.

Change log
  • Added in v6.0.
  • Switched from Bluebird to native Promise in v7.0.
Back to top