[w3c/payment-request] Do we need "doc is fully active" checks on `response.complete()`? (#731)

@domenic can you sanity check something for me... we don't currently check if document is "fully active" on `response.complete()`. 

But, in theory:

```JS
const iframe = getSomeIframe();
const response = await getResponseFrom(iframe);
await response.retry({});
await new Promise(resolve => {
  iframe.onload = resolve;
  iframe.src = "some/new/location";
}
// oh noes!
await response.complete("success"); // <- should probably reject, invalid state?. 
```

Similarly:

```JS
const iframe = getSomeIframe();
const response = await getResponseFrom(iframe);
await response.retry({});
const completePromise = response.complete("success");
await new Promise(resolve => {
  iframe.onload = resolve;
  iframe.src = "some/new/location";
}
await completePromise; // <- should probably reject, invalid state?
```


-- 
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/issues/731

Received on Tuesday, 19 June 2018 17:20:00 UTC