{{DOMRef()}}{{SeeCompatTable}}
The PromiseResolver
interface represents an object controlling the state and the result value of a {{domxref("Promise")}}
Properties
No specific property.
Methods
Doesn't inherit any method.
- {{domxref("PromiseResolver.fulfill()")}}
-
Appends fullfill and failure callbacks to the
Promise
and returns a newPromise
resolving to the return value of the selected callback, fullfill or failure. - {{domxref("PromiseResolver.resolve()")}}
-
Appends a failure callback to the
Promise
and returns a newPromise
resolving to the return value of the callback. - {{domxref("PromiseResolver.reject()")}}
Specification
Specification | Status | Comment |
---|---|---|
{{SpecName('DOM WHATWG', '#promiseresolver', 'PromiseResolver')}} | {{Spec2('DOM WHATWG')}} | Initial definition |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | {{CompatNo}} | {{CompatGeckoDesktop(24)}} as FutureResolver {{CompatGeckoDesktop(25)}} as PromiseResolver [1] |
{{CompatNo}} | {{CompatNo}} | {{CompatNo}} |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatNo}} | {{CompatGeckoMobile(24)}} as FutureResolver {{CompatGeckoMobile(25)}} as PromiseResolver [1] |
{{CompatNo}} | {{CompatNo}} | {{CompatNo}} |
[1] Gecko 24 has an experimental implementation of PromiseResolver
, under the initial name of FutureResolver
. It got renamed to its final name in Gecko 25. To disabled, the preference dom.promise.enabled
(in Gecko 24, dom.future.enabled
) must be switched to false
. Note that it is enabled by default except on B2G builds.
See also
- Using DOM promises
- Related DOM interfaces: {{domxref("Promise")}}