Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 447529 of PromiseResolver

  • Revision slug: Web/API/PromiseResolver
  • Revision title: PromiseResolver
  • Revision id: 447529
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{DOMRef()}}{{SeeCompatTable}}

The PromiseResolver interface represents a f

Properties

No specific property.

Methods

Doesn't inherit any method.

{{domxref("Promise.fulfill()")}}
Appends fullfill and failure callbacks to the Promise and returns a new Promise resolving to the return value of the selected callback, fullfill or failure.
{{domxref("Promise.resolve()")}}
Appends a failure callback to the Promise and returns a new Promise resolving to the return value of the callback.
{{domxref("Promise.reject()")}}

Specification

Specification Status Comment
{{SpecName('DOM WHATWG', '#interface-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

Revision Source

<p>{{DOMRef()}}{{SeeCompatTable}}</p>
<p>The <code><strong>PromiseResolver</strong></code> interface represents a <a href="https://en.wikipedia.org/wiki/Futures_and_promises" title="https://en.wikipedia.org/wiki/Futures_and_promises"><em>f</em></a></p>
<h2 id="Properties">Properties</h2>
<p><em>No specific property.</em></p>
<h2 id="Methods">Methods</h2>
<p><em>Doesn't inherit any method.</em></p>
<dl>
  <dt>
    {{domxref("Promise.fulfill()")}}</dt>
  <dd>
    Appends fullfill and failure callbacks to the <code>Promise</code> and returns a new <code>Promise</code> resolving to the return value of the selected callback, fullfill or failure.</dd>
  <dt>
    {{domxref("Promise.resolve()")}}</dt>
  <dd>
    Appends a failure callback to the <code>Promise</code> and returns a new <code>Promise</code> resolving to the return value of the callback.</dd>
  <dt>
    {{domxref("Promise.reject()")}}</dt>
</dl>
<h2 id="Specification">Specification</h2>
<table class="standard-table">
  <tbody>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
    <tr>
      <td>{{SpecName('DOM WHATWG', '#interface-promiseresolver', 'PromiseResolver')}}</td>
      <td>{{Spec2('DOM WHATWG')}}</td>
      <td>Initial definition</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{CompatibilityTable}}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatGeckoDesktop(24)}} as <code>FutureResolver</code><br />
          {{CompatGeckoDesktop(25)}} as <code>PromiseResolver </code>[1]</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatNo}}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Mobile</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatGeckoMobile(24)}} as <code>FutureResolver</code><br />
          {{CompatGeckoMobile(25)}} as <code>PromiseResolver</code> [1]</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatNo}}</td>
        <td>{{CompatNo}}</td>
      </tr>
    </tbody>
  </table>
</div>
<p>[1] Gecko 24 has an experimental implementation of <code>PromiseResolver</code>, under the initial name of <code>FutureResolver</code>. It got renamed to its final name in Gecko 25. To disabled, the preference <code>dom.promise.enabled</code> (in Gecko 24, <code>dom.future.enabled</code>) must be switched to <code>false</code>. Note that it is enabled by default except on B2G builds.</p>
<h2 id="See_also">See also</h2>
<ul>
  <li><a href="/en-US/docs/Web/API/Guide/Using_DOM_Promises" title="/en-US/docs/Web/API/Guide/Using_DOM_Promises">Using DOM promises</a></li>
  <li>Related DOM interfaces: {{domxref("Promise")}}</li>
</ul>
Revert to this revision