Re: [whatwg/dom] Define a 'CancelationController' and 'CancelationSignal' interface. (#434)

TC39: tokens is actually incompatible with what we want for Fetch. We need objects that we can extend. I'm happy with TC39 uplifting what we come up with here (and leaving events and maybe the exception host-defined), but I don't want to yet again wait for TC39. I'm also happy to take any feedback into account that makes such uplifting easier.

Naming: I'm happy to rename this AbortController / AbortSignal, especially if we can reuse "AbortError" as @domenic pointed out in the IDL PR. Any reason we didn't go with that?

Branding: I think this is something TC39 should solve for all objects. Once they do, we'll have it here too. See also https://github.com/heycam/webidl/issues/129.

Composing cancellation signals: @bterlson can you provide an example?

Error versus a new type: it seems if you just reversed the two classes in @bterlson's example and check for abort/cancel first you'd be fine, regardless of base class.

(Note that I haven't checked the above with @jakearchibald and @mikewest, who are mostly driving the work here.)

-- 
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/dom/pull/434#issuecomment-292696490

Received on Saturday, 8 April 2017 05:30:25 UTC