Retry request abort the update#723
Conversation
345c887 to
5f7a7f8
Compare
899ec95 to
5301abc
Compare
|
@domenic, little one for you :) |
domenic
left a comment
There was a problem hiding this comment.
I'm a bit confused as to why this algorithm sets complete to true but the "user aborts the payment request algorithm" does not.
index.html
Outdated
| "<a>closed</a>". | ||
| </li> | ||
| <li>Reject the promise | ||
| <li>If <var>request</var><a>[[\response]]</a> is not null, |
There was a problem hiding this comment.
D'oh... keep doing this. Need to add a linter rule for ReSpec
index.html
Outdated
| then: | ||
| <ol> | ||
| <li>Let <var>response</var> be | ||
| <var>request</var><a>[[\response]]</a>. |
There was a problem hiding this comment.
Missing dot. Also maybe you should do this before the "if request.[[response]] is not null" step (and then just check if response is null)
index.html
Outdated
| <li>Let <var>response</var> be | ||
| <var>request</var><a>[[\response]]</a>. | ||
| </li> | ||
| <li>Set <var>response</var><a>[[\complete]]</a> to true. |
index.html
Outdated
| </li> | ||
| <li>Set <var>response</var><a>[[\complete]]</a> to true. | ||
| </li> | ||
| <li>Reject <var>response</var><a>[[\retryPromise]]</a> with |
index.html
Outdated
| </li> | ||
| <li>Set <var>response</var><a>[[\complete]]</a> to true. | ||
| </li> | ||
| <li>Reject <var>response</var><a>[[\retryPromise]]</a> with |
There was a problem hiding this comment.
Is this guaranteed to always be non-null? If so maybe add an assert.
| </ol> | ||
| </li> | ||
| <li>Otherwise, reject | ||
| <var>request</var>.<a>[[\acceptPromise]]</a> with |
There was a problem hiding this comment.
The note at the bottom seems like it needs updating to mention the retryPromise/retry() in addition to the acceptPromise/show().
There was a problem hiding this comment.
Made a few clarifications throughout the spec about this.
Yeah, should probably do the same in "user aborts the payment request algorithm". Having a look. |
5301abc to
fe8bc97
Compare
fe8bc97 to
0d9db1c
Compare
|
... now to test all this goodness 💪 |
domenic
left a comment
There was a problem hiding this comment.
LGTM with wording tweaks to the note
index.html
Outdated
| <a data-lt="PaymentRequest.show">show()</a>. | ||
| </p> | ||
| <p data-link-for="PaymentResponse"> | ||
| Similarly, aborting the update occurs during a <a>retry()</a> will |
There was a problem hiding this comment.
This sentence doesn't read right... "aborting the update occurs during a retry() will cause"?
index.html
Outdated
| Similarly, aborting the update occurs during a <a>retry()</a> will | ||
| cause the <a>[[\retryPromise]]</a> to reject, and the corresponding | ||
| <a>PaymentRequest</a>'s <a>[[\complete]]</a> internal slot will be | ||
| set to true (i.e., meaning it can no longer be used). |
There was a problem hiding this comment.
"i.e." and "meaning" seem redundant; pick one or the other.
|
Added test web-platform-tests/wpt@9f479ea |
part 3 of #705 - aborting the update when in retry state
The following tasks have been completed:
Implementation commitment:
Impact on Payment Handler spec?
Preview | Diff