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>

All these examples can use a single `<div class="example no-backref">`. No need to have one per example.

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

Received on Wednesday, 9 September 2015 07:40:16 UTC