- From: Kyle Simpson <notifications@github.com>
- Date: Sat, 06 Feb 2021 08:17:01 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 6 February 2021 16:17:14 UTC
> 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