Skip to content

Commit b417638

Browse files
retry() interacting with abort the update (#723)
1 parent f15ef69 commit b417638

File tree

1 file changed

+43
-14
lines changed

1 file changed

+43
-14
lines changed

index.html

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3239,10 +3239,10 @@

32393239
li>
32403240
<li>Return <var>retryPromisevar>.
32413241
<p class="note">
3242-
The <var>retryPromisevar> will later be resolved or rejected by
3243-
either the <a>user accepts the payment request algorithma> or
3244-
the <a>user aborts the payment request algorithma>, which are
3245-
triggered through interaction with the user interface.
3242+
The <var>retryPromisevar> will later be resolved by the <a>user
3243+
accepts the payment request algorithma>, or rejected by either
3244+
the <a>user aborts the payment request algorithma> or <a>abort
3245+
the updatea>.
32463246
p>
32473247
li>
32483248
ol>
@@ -3546,7 +3546,8 @@

35463546
td>
35473547
<td data-link-for="PaymentResponse">
35483548
Is true if the request for payment has completed (i.e.,
3549-
<a>complete()a> was called), or false otherwise.
3549+
<a>complete()a> was called, or there was a fatal error that
3550+
made the response not longer usable), or false otherwise.
35503551
td>
35513552
tr>
35523553
<tr>
@@ -4218,10 +4219,15 @@

42184219
<li>Let <var>responsevar> be
42194220
<var>requestvar>.<a>[[\response]]a>.
42204221
li>
4221-
<li>If <var>responsevar> not null:
4222+
<li>If <var>responsevar> is not null:
42224223
<ol>
4224+
<li>Set <var>responsevar>.<a>[[\complete]]a> to true.
4225+
li>
4226+
<li>Assert: <var>responsevar>.<a>[[\retryPromise]]a> is not
4227+
null.
4228+
li>
42234229
<li>Reject <var>responsevar>.<a>[[\retryPromise]]a> with
4224-
<var>errorvar>
4230+
<var>errorvar>.
42254231
li>
42264232
ol>
42274233
li>
@@ -4546,7 +4552,22 @@

45464552
<li>Set <var>requestvar>.<a>[[\state]]a> to
45474553
"<a>closeda>".
45484554
li>
4549-
<li>Reject the promise
4555+
<li>Let <var>responsevar> be
4556+
<var>requestvar>.<a>[[\response]]a>.
4557+
li>
4558+
<li>If <var>responsevar> is not null, then:
4559+
<ol>
4560+
<li>Set <var>responsevar>.<a>[[\complete]]a> to true.
4561+
li>
4562+
<li>Assert: <var>responsevar>.<a>[[\retryPromise]]a> is
4563+
not null.
4564+
li>
4565+
<li>Reject <var>responsevar>.<a>[[\retryPromise]]a>
4566+
with <var>exceptionvar>.
4567+
li>
4568+
ol>
4569+
li>
4570+
<li>Otherwise, reject
45504571
<var>requestvar>.<a>[[\acceptPromise]]a> with
45514572
<var>exceptionvar>.
45524573
li>
@@ -4560,17 +4581,25 @@

45604581
section>
45614582
<div class="note">
45624583
<p>
4563-
<a data-lt="abort the update">Aborting the updatea> is performed
4564-
when there is a fatal error updating the payment request, such as
4565-
the supplied <var>detailsPromisevar> rejecting, or its
4566-
fulfillment value containing invalid data. This would potentially
4567-
leave the payment request in an inconsistent state since the
4568-
developer hasn't successfully handled the change event.
4584+
<a>Abort the updatea> runs when there is a fatal error updating
4585+
the payment request, such as the supplied <var>detailsPromisevar>
4586+
rejecting, or its fulfillment value containing invalid data. This
4587+
would potentially leave the payment request in an inconsistent
4588+
state since the developer hasn't successfully handled the change
4589+
event.
4590+
p>
4591+
<p>
45694592
Consequently, the <a>PaymentRequesta> moves to a "<a>closeda>"
45704593
state. The error is signaled to the developer through the rejection
45714594
of the <a>[[\acceptPromise]]a>, i.e., the promise returned by
45724595
<a data-lt="PaymentRequest.show">show()a>.
45734596
p>
4597+
<p data-link-for="PaymentResponse">
4598+
Similarly, <a>abort the updatea> occurring during <a>retry()a>
4599+
causes the <a>[[\retryPromise]]a> to reject, and the
4600+
corresponding <a>PaymentRequesta>'s <a>[[\complete]]a> internal
4601+
slot will be set to true (i.e., it can no longer be used).
4602+
p>
45744603
div>
45754604
section>
45764605
section>

0 commit comments

Comments
 (0)