- From: jan-ivar <notifications@github.com>
- Date: Mon, 27 Apr 2015 07:55:16 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
Received on Monday, 27 April 2015 14:55:43 UTC
@martinthomson elaborating on your idea, why not simply: let abortFetch; let p = new Promise(resolve => abortFetch = resolve); fetch(url, p).then(success, failure); // on error abortFetch(); causing fetch to reject with `CancelledError`? Simple on the implementation end as well, little more than: Promise.race([operation, p.then(() => { throw DOMException("", "CancelledError"); }, () => { throw DOMException("", "CancelledError"); })]); --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/27#issuecomment-96685339
Received on Monday, 27 April 2015 14:55:43 UTC