Closed marcoscaceres closed 6 years ago
@domenic can you sanity check something for me... we don't currently check if document is "fully active" on response.complete().
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?
Cleaned up above a little bit.
Yeah, good catch.
The first example I understand. The second example seems pretty hard to hit in practice, but probably still worth guarding against.
@domenic can you sanity check something for me... we don't currently check if document is "fully active" on
response.complete()
.But, in theory:
Similarly: