throwIfAborted method
void
throwIfAborted()
The throwIfAborted()
method throws the signal's abort
AbortSignal.reason if the signal has been aborted; otherwise it does
nothing.
An API that needs to support aborting can accept an AbortSignal object
and use throwIfAborted()
to test and throw when the
abort
event is signalled.
This method can also be used to abort operations at particular points in code, rather than passing to functions that take a signal.
Implementation
external void throwIfAborted();