- From: Domenic Denicola <notifications@github.com>
- Date: Wed, 21 Nov 2018 16:56:10 -0800
- To: w3c/payment-request <payment-request@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/payment-request/pull/811/review/177473666@github.com>
domenic requested changes on this pull request.
Needs more precision. "The top-level browsing context" is never correct; there are many of them per UA, which is why we're making this change, after all. So pick specific JS objects (presumably the PaymentRequest/PaymentResponse instances) and navigate from them to top-level BCs.
> @@ -935,9 +934,9 @@ <h2>
then return <a>a promise rejected with</a> an
"<a>InvalidStateError</a>" <a>DOMException</a>.
</li>
- <li>If the <a>user agent</a>'s <a>payment request is showing</a>
- boolean is true, then return <a>a promise rejected with</a> an
- "<a>AbortError</a>" <a>DOMException</a>.
+ <li>If the <a>top-level browsing context</a>'s <a>payment request is
"the top-level browsing context" is not well-defined. Consider a same-origin popup window (i.e. two separate top-level windows which can synchronously access each other) in which you call `window1.PaymentRequest.prototype.show.call(window2PaymentRequestInstance)`.
You want "this `PaymentRequest`'s [relevant global object](https://html.spec.whatwg.org/#concept-relevant-global)'s browsing context's top-level browsing context". Maybe make a definition to shorten that (e.g. "payment-relevant browsing context of _obj_" or "payment request is showing in the same browsing context as _obj_").
And, if you're feeling evil, write tests for the case I described ^_^.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/pull/811#pullrequestreview-177473666
Received on Thursday, 22 November 2018 00:56:32 UTC