- From: Jake Archibald <notifications@github.com>
- Date: Thu, 28 Jan 2016 16:21:15 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
Received on Friday, 29 January 2016 00:21:45 UTC
@appden ```js const responsePromise = fetch(url).then(parseResponse); const resultPromise = responsePromise.then(retrieveResult); ``` `responsePromise.cancel()` would also result in the cancelation of `resultPromise` if `responsePromise` has not yet settled (meaning `resultPromise` has not yet settled). `resultPromise.cancel()` would also result in the cancelation of `responsePromise` if `resultPromise` has not setted *and* `responsePromise` has not settled. ```js const responsePromise = fetch(url).then(parseResponse); const resultPromise = responsePromise.then(retrieveResult); const anotherResultPromise = responsePromise.then(retrieveResultDifferently); ``` Here, canceling `anotherResultPromise` will only cancel `anotherResultPromise`. `responsePromise` is not canceled because `resultPromise` is interested in the result. --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/27#issuecomment-176494248
Received on Friday, 29 January 2016 00:21:45 UTC