web-ext icon indicating copy to clipboard operation
web-ext copied to clipboard

Add AbortController to submit-addon.js's fetch requests

Open eviljeff opened this issue 3 years ago • 0 comments

follow-up for https://github.com/mozilla/web-ext/issues/2451 - to quote @rpl

This seems something that the AbortController may allow us to simplify and turn into a "more visually linear" async function, node-fetch seems to supporting the AbortController, the only caveat seems to be that it got exposed as a native global only in nodejs 14.17.0, or earlier nodejs version it would need an npm package to polyfill the missing global:

https://www.npmjs.com/package/node-fetch#request-cancellation-with-abortsignal

eviljeff avatar Aug 02 '22 13:08 eviljeff