# promise object

Information note**STABLE.**   
  
This API is reliable and breaking changes are unlikely.

qlik.promise(executor(resolve, reject))

Promise utility that can be used for asynchronous operations. Very useful for the paint method to indicate when the rendering is completed.

Full documentation can be found on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Promise.

## Version history

Version history

| Version state | Details |
| --- | --- |
| Introduced | 3.0 |

## Parameters

### executor

Type: Function

The executing function with two parameters:

* resolve
* reject

## Example

```
var Promise = qlik.Promise;
qlik.registerExtension("dumpchart",
{
  paint:function($element,layout) {
    return new Promise(function(resolve, reject) {
      setTimeout(function() {
        $element.html(JSON.stringify(layout));
        resolve(); // Extension painted successfully
      }, 1000);
    });
  }
});
```