New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retry request abort the update #723
Conversation
345c887
to
5f7a7f8
Compare
899ec95
to
5301abc
Compare
@domenic, little one for you :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -4545,7 +4545,20 @@ <h2> | |||
<li>Set <var>request</var>.<a>[[\state]]</a> to | |||
"<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing dot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing dot
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing dot
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this guaranteed to always be non-null? If so maybe add an assert.
</li> | ||
</ol> | ||
</li> | ||
<li>Otherwise, reject | ||
<var>request</var>.<a>[[\acceptPromise]]</a> with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 💪 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with wording tweaks to the note
index.html
Outdated
Consequently, the <a>PaymentRequest</a> moves to a "<a>closed</a>" | ||
state. The error is signaled to the developer through the rejection | ||
of the <a>[[\acceptPromise]]</a>, i.e., the promise returned by | ||
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"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