I don't believe so. We're not actually creating a signal but rater we're accessing the signal property of the AbortController instance.
Edit:Here's the spec! Can confirm that the signal property is a boolean so we're really just talking one signal. You'd likely need another instance of AbortController if you're looking to potentially cancel multiple requests.
Edit 2: I could imagine, though, that you might want to cancel multiple http requests at the same time, in which case you could use the same signal to tell each fetch request to abort and that would work well.
Can I create multiple signals from the same instance of AbortController?
I don't believe so. We're not actually creating a signal but rater we're accessing the
signal
property of theAbortController
instance.Edit: Here's the spec! Can confirm that the
signal
property is a boolean so we're really just talking one signal. You'd likely need another instance ofAbortController
if you're looking to potentially cancel multiple requests.Edit 2: I could imagine, though, that you might want to cancel multiple http requests at the same time, in which case you could use the same signal to tell each fetch request to abort and that would work well.
I guess that second edit would solve most cases I can think of. Thanks for sharing.
Yes, I can confirm that.