- From: Jake Archibald <notifications@github.com>
- Date: Fri, 27 Mar 2015 06:56:13 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
Received on Friday, 27 March 2015 13:56:46 UTC
@jyasskin
```js
function myTransform(yourPromise) {
return yourPromise
.then(value => transform(value))
.then(value => transform2(value));
}
myTransform(fetch(url)).cancel();
```
This would:
1. Cancel the promise returned by `.then(value => transform2(value))`
2. Cancel the promise returned by `.then(value => transform(value))` because all its child promises cancelled
3. Cancel `yourPromise` (which is `fetch(url)`) because all its child promises cancelled
---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/27#issuecomment-86946550
Received on Friday, 27 March 2015 13:56:46 UTC