{{ ApiRef("DOM") }} {{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()")}}
- Sets the result value of the associated
Promise
to the parameter and its state tofulfill
. Call the fulfill callbacks or, if the asynch parameter is set totrue
, queue a task to call them. - {{domxref("PromiseResolver.resolve()")}}
- ...
- {{domxref("PromiseResolver.reject()")}}
- Sets the result value of the associated
Promise
to the parameter and its state torejected
. Call the reject callbacks or if the asynch parameter is set totrue
, queue a task to call them.
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] Nightly of Gecko 24 got an experimental implementation of PromiseResolver
, under the initial name of FutureResolver
. It got renamed to its final name in the Nightly of Gecko 25. To disabled, the preference dom.promise.enabled
(in Gecko 24, dom.future.enabled
) must be switched to false
. Note only Nightly and Aurora versions of Firefox get this interface enabled by default. Beta and Release versions of Gecko have them disabled by default.
See also
- Using DOM promises
- Related DOM interfaces: {{domxref("Promise")}}