@esfx/cancelable-dom-shim Package
The @esfx/cancelable-dom-shim
package provides a global shim to make the DOM @"!AbortController" and @"!AbortSignal" classes compatible with @esfx/cancelable.
Installation
npm i @esfx/cancelable-dom-shim
Usage
import "@esfx/cancelable-dom-shim"; // triggers global-scope side effects
import { Cancelable } from "@esfx/cancelable";
const abortController = new AbortController();
const signal = abortController[Cancelable.cancelSignal]();
Remarks
This shim adds a default implementation of the Cancelable interface to the following global DOM objects:
- @"!AbortController" implements:
- @"!AbortSignal" implements: