PromiseResolver

この記事はまだ日本語に翻訳されていません。MDN の翻訳はボランティアによって行われています。是非 MDN に登録し、私たちの力になって下さい。

« DOM Reference

This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.

The PromiseResolver interface represents an object controlling the state and the result value of a Promise.

Properties

No specific property.

Methods

Doesn't inherit any method.

PromiseResolver.fulfill()
Sets the result value of the associated Promise to the parameter and its state to fulfill. Call the fulfill callbacks or, if the asynch parameter is set to true, queue a task to call them.
PromiseResolver.resolve()
...
PromiseResolver.reject()
Sets the result value of the associated Promise to the parameter and its state to rejected. Call the reject callbacks or if the asynch parameter is set to true, queue a task to call them.

Specification

Specification Status Comment
DOM Living Standard Initial definition

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support Not supported 24 (24) as FutureResolver
25 (25) as PromiseResolver [1]
Not supported Not supported Not supported
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support Not supported 24.0 (24) as FutureResolver
25.0 (25) as PromiseResolver [1]
Not supported Not supported Not supported

[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

Document Tags and Contributors

Contributors to this page: kscarfone, teoli
最終更新者: kscarfone,