abort-controller icon indicating copy to clipboard operation
abort-controller copied to clipboard

Use native AbortController when possible.

Open Gozala opened this issue 5 years ago • 1 comments

This library uses browser field of package.json in order to avoid including a shim and uses own implementation otherwise. That however creates problems when used in Electron (main process) because there it loads a own implementation which native APIs like fetch reject with error like:

TypeError: Failed to execute 'fetch' on 'Window': member signal is not of type AbortSignal.

It would be nice if implementation still checked for presence of native AbortSignal just in case it exists.

Gozala avatar Aug 18 '20 01:08 Gozala

Just in case other people stumble over this, there is the package https://github.com/achingbrain/native-abort-controller that works around this particular issue.

martinheidegger avatar Mar 30 '21 16:03 martinheidegger