@@ -8390,7 +8390,7 @@ IDL [=promise type=] values are represented by ECMAScript [=PromiseCapability=]
8390
8390
|newCapability|).
8391
8391
8392
8392
Note: This algorithm will behave in a very similar way to the
8393
- {{%Promise.prototype.then%|Promise .then()}} method.
8393
+ {{%Promise.prototype.then%|promise .then()}} method.
8394
8394
In particular, if the steps return a value of type |U| or
8395
8395
<code><a interface>Promise</a><|U|></code>, this algorithm returns a
8396
8396
<code><a interface>Promise</a><|U|></code> as well.
@@ -8465,11 +8465,23 @@ IDL [=promise type=] values are represented by ECMAScript [=PromiseCapability=]
8465
8465
1. [=Reject=] |promise| with |reason|.
8466
8466
1. [=Wait for all=] with |promises|, given |successSteps| and |failureSteps|.
8467
8467
1. Return |promise|.
8468
+
8469
+ <p class="note">This definition is useful when you wish to aggregate the results of multiple
8470
+ promises, and then produce another promise from them, in the same way that
8471
+ {{Promise/all()|Promise.all()}} functions for JavaScript code. If you do not need to produce
8472
+ another promise, then [=waiting for all=] is likely better.
8468
8473
</div>
8469
8474
8470
- This phrase is useful when you wish to aggregate the results of multiple promises, and then produce
8471
- another promise from them, in the same way that {{Promise/all()|Promise.all()}} functions for
8472
- JavaScript code.
8475
+ <div algorithm>
8476
+ To <dfn export lt="mark a promise as handled|mark as handled">mark as handled</dfn> a
8477
+ <code><a interface>Promise</a><<var ignore>T</var>></code> |promise|, set
8478
+ |promise|.\[[Promise]].\[[PromiseIsHandled]] to true.
8479
+
8480
+ <p class="note">This definition is useful for promises for which you expect rejections to often
8481
+ be ignored; it ensures such promises do not cause {{Window/unhandledrejection}} events. The most
8482
+ common use case is for promise properties, which the web developer might or might not consult.
8483
+ An example is the {{WritableStreamDefaultWriter/closed|writableStreamWriter.closed}} promise.
8484
+ </div>
8473
8485
8474
8486
8475
8487
<h5 id="es-promise-examples">Examples</h5>
0 commit comments