Re: [whatwg/fetch] Aborting a fetch: The Next Generation (#447)

If revealing constructors bother you so much, we could do something where you can *also* pre-construct the controller via `new FetchController`, which you then pass as `control` (kind of like a request token).

Of course, this makes it so you run into a whole thorny woods of potential mis-uses like attempting to use the same `FetchController` for multiple fetches. The revealing constructor makes it so that you're *guaranteed* to only have a 1:1 controller:fetch relationship, much like how `resolve` and `reject` are directly tied to their `new Promise`.

Of course, you could *want* to design for a world where one controller can control multiple Fetches (it's a use case you described for tokens above), but then you'd have to grapple with all the things that breaking that symmetrical assurance would ruin, like `observer`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/447#issuecomment-270632169

Received on Thursday, 5 January 2017 12:21:49 UTC