KEMBAR78
Do we need "doc is fully active" checks on `response.complete()`? · Issue #731 · w3c/payment-request · GitHub
Skip to content

Do we need "doc is fully active" checks on response.complete()? #731

@marcoscaceres

Description

@marcoscaceres

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

But, in theory:

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

Similarly:

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions