A polyfill for the AbortController API and abortable fetch, providing stubs for browsers without native support.
abortcontroller-polyfill is a JavaScript library that polyfills the AbortController DOM API, allowing developers to use abortable fetch requests in browsers without native support. It provides stub implementations that simulate abort behavior by triggering catch blocks with AbortError, solving compatibility issues in older environments. This enables consistent request cancellation patterns across different browsers and Node.js.
Frontend developers working on web applications that need to support older browsers like Internet Explorer 8-11 or legacy webviews, and Node.js developers requiring abortable fetch functionality with libraries like node-fetch.
Developers choose this polyfill for its minimal footprint, adherence to the DOM specification, and seamless integration with existing fetch polyfills. It uniquely supports a wide range of environments, from IE8 to modern Node.js, without modifying native globals unless desired.
Polyfill for the AbortController DOM API and abortable fetch (stub that calls catch, doesn't actually abort request).
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports Internet Explorer 8-11 and legacy webviews by integrating with fetch and promise polyfills, with detailed setup examples in the README for various environments.
Offers a ponyfill option in 'dist/cjs-ponyfill' for use with node-fetch, allowing abortable requests in server-side code without modifying global objects.
Implements standard AbortController and AbortSignal interfaces as per the DOM specification, ensuring consistent API usage and future compatibility.
Provides separate imports like 'polyfill-patch-fetch' and 'abortcontroller-polyfill-only', enabling tailored usage based on whether fetch patching is needed.
Does not actually close HTTP connections when aborted; it only triggers catch blocks with AbortError, which may not free up network resources or stop ongoing requests.
Requires installing and configuring multiple polyfills (e.g., promise-polyfill, unfetch) for older browsers like IE8-11, increasing bundle size and setup complexity.
In create-react-app projects, ESLint's no-undef rule can cause errors, necessitating workarounds like manual declarations, as admitted in the README.
Primarily designed for patching fetch(); does not polyfill AbortController for other DOM APIs or libraries without additional custom integration efforts.