- From: Yutaka Hirano <notifications@github.com>
- Date: Wed, 09 Sep 2015 01:53:18 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
Received on Wednesday, 9 September 2015 08:53:53 UTC
> +
> +<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