abortcontroller-polyfill icon indicating copy to clipboard operation
abortcontroller-polyfill copied to clipboard

Calling `abort` multiple times causes the `abort` event to be triggered multiple times

Open mifi opened this issue 4 months ago • 0 comments

This is not how it's supposed to work.

const { AbortController } = require('abortcontroller-polyfill/dist/cjs-ponyfill');

const a = new AbortController()
a.signal.addEventListener('abort', () => console.log('aborted'))
a.abort()
a.abort()

// outputs "aborted" twice

mifi avatar Sep 03 '25 21:09 mifi