This includes a polyfill for AbortController, and also some utilities
You can use AbortError like a generic error emitted from an AbortController. This should even work for DOMException
s.
try {
checkAbort(AbortSignal.abort());
} catch (e) {
if (e instanceof AbortError) {
// true
}
}