I totally understand that polyfilling DOMException is not a surface of this polyfill, but I think that Aborting requests README section should have a note that DOMException also should be polyfilled in browsers that don't support it (or its constructor).
The new DOMException constructor is not implemented in IE11 and would throw.
PS: not sure I can find a polyfill that adds the DOMException constructor support over there. If so - it perhaps also could be noted.
Oops, I see that it's polyfilled below https://github.com/github/fetch/blob/master/fetch.js#L427
Sorry
@zerkms, it's polyfilled but it's not in global namespace. So, I think it makes sense to reopen this issue. Otherwise you need to add additional custom code that would put DOMException into global namespace.
@ArtemZag yep, makes sense.
We export DOMException. That way you can use it in error-handling code without having to rely on the presence of native one. We're not certain enough in our polyfill of DOMException that we would automatically add it to the global namespace.
I'm closing this because it doesn't look to me like there's anything actionable for us to do.
if (ex.name === 'AbortError'), and thus will work in any browser;
Most helpful comment
We export DOMException. That way you can use it in error-handling code without having to rely on the presence of native one. We're not certain enough in our polyfill of DOMException that we would automatically add it to the global namespace.