Re: [fetch] Add description for suspension, resuming and garbage collection. (#121)

> +
> +<div class="example no-backref">
> + <p>The user agent cannot terminate the fetch because one can observe the termination by registering
> + a handler for the promise object.
> + <pre>window.promise = fetch("https://www.example.com/")
> +  .then(res => res.body.getReader().closed)</pre>
> +</div>
> +
> +<div class="example no-backref">
> + <p>The user agent cannot terminate the fetch as termination would be observable via the registered
> + handler.
> + <pre>fetch("https://www.example.com/")
> +  .then(res => {
> +    res.body.getReader().closed.then(() => console.log("stream closed!"))
> +  })</pre>
> +</div>

Done.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/121/files#r39019853

Received on Wednesday, 9 September 2015 08:53:53 UTC