Skip to content

lib: initial experimental AbortController implementation

AbortController impl based very closely on: https://github.com/mysticatea/abort-controller

Marked experimental. Global (writable, configurable) Not currently used by any of the existing promise apis. AbortSignal extends from EventEmitter instead of EventTarget.

const ac = new AbortController();

ac.onabort = () => {};

// Or ...

ac.on('abort', () => {});

ac.abort();

console.log(ac.aborted);
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading