Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use native abort controller if available #5

Conversation

achingbrain
Copy link
Contributor

Some environments like Electron's Renderer process have native browser APIs available but don't respect the browser field in package.json.

You also don't always want to use 100% browser or 100% node APIs depending on your application, so don't make the user choose all or nothing.

Here we switch out abort-controller for native-abort-controller which will return the native abort controller if it's available, or the abort-controller polyfill if it is not.

Some environments like Electron's Renderer process have native browser
APIs available but don't respect the `browser` field in `package.json`.

You also don't always want to use 100% browser or 100% node APIs depending
on your application, so don't make the user choose all or nothing.

Here we switch out `abort-controller` for `native-abort-controller`
which will return the native abort controller if it's available, or the
`abort-controller` polyfill if it is not.
@achingbrain
Copy link
Contributor Author

This bubbles up to ipfs/js-ipfs#3251

@achingbrain
Copy link
Contributor Author

..and also addresses #3 (comment)

@jacobheun jacobheun merged commit db1fd14 into jacobheun:master Aug 31, 2020
@jacobheun
Copy link
Owner

Published as 2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants