- From: Mattias Buelens <notifications@github.com>
- Date: Tue, 16 Nov 2021 16:44:16 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 17 November 2021 00:44:29 UTC
I don't think `AbortSignal.prototype.timeout()` would be a good API. An `AbortSignal` should only be able to *observe* the aborted state, it should not be able to *change* if or when it becomes aborted. For example, you may want to pass the same `AbortSignal` to several function calls so you can abort them all at once, but you don't want any single call to cause itself *and all other calls* to become aborted. Aborting the signal should only be done by the `AbortController`, so perhaps you'd want `AbortController.prototype.timeout()` instead. (Although that's still kinda weird...) Anyway, this goes beyond the scope of the proposed `AbortSignal.timeout()` method. Let's keep it as a one-shot for now. 🙂 -- 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/951#issuecomment-970953035
Received on Wednesday, 17 November 2021 00:44:29 UTC