Re: [whatwg/dom] Expose an `aborted` promise on AbortSignal? (#946)

> what do you think? Would Jake's idea version (returning a promise) address your use case?

I'm not sure, lemme try to clarify. Could it be used kinda like this?

```js
var ac = new AbortController();
var pr = abortableTask(ac.signal,async (setOnAbort) => {
   setOnAbort(() => "aborted!");
});

pr.then(msg => console.log(msg));

ac.abort();
// aborted!
```

Am I understanding it correctly?

-- 
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/issues/946#issuecomment-774501237

Received on Saturday, 6 February 2021 16:17:14 UTC