Thread with 4 posts
jump to expanded post🔄 Did you know? When aborting a fetch request with AbortController, Chromium browsers stay silent while Safari and Firefox throw errors. TIL.
https://codesandbox.io/s/polling-abort-error-xq8kc4?file=/src/index.mjs https://codesandbox.io/s/polling-abort-error-xq8kc4?file=/src/index.mjs
@nicknisi What's the spec say about it though?
Aaah, no, your abortion example is not correct. The thing is, it's showing me message (in firefox) that `controller is not defined`). So if you tab away after that polling endpoint finished and before a new one started, or something, it aborts.
My example (almost direct copy from mdn, except with your visibility listener) shows that behaviour at least, because the download size is much bigger:
https://codesandbox.io/s/polling-abort-error-forked-fgrqln?file=/src/index.mjs
Fun stuff. Y u distracc me from work?
@zlatko Hmm, but in your example, isn’t the fetch immediately finishing so there's nothing to abort?
@nicknisi well to me YOUR example was finishing early, and mine was downloading some mpeg. Strange. Anyway, my example is copied from mdn about abort and shows that - download is stopped when you "abort", and no error. But if you tab away while download is in progress and there is an abort listener, then error..