ShieldBattery icon indicating copy to clipboard operation
ShieldBattery copied to clipboard

Move to AbortController instead of the hand-rolled CancelToken

Open tec27 opened this issue 4 years ago • 1 comments

The idea behind this is pretty much the same, just AbortController has support from various major APIs (fetch, etc.).

AbortController is available in Node as of v15, but we're currently on v14. I think we could polyfill it with: https://www.npmjs.com/package/abort-controller and remove that once the next major LTS version is released.

tec27 avatar Jun 27 '21 03:06 tec27

As of cc4f4c410bd6078f612ae3e65957d382bee7932b, there's a polyfill on older Node versions, so this should be usable now, just need to move the current usages.

tec27 avatar Sep 05 '21 07:09 tec27