Closed joaovieira closed 6 years ago
I've had to hack this polyfill to be able to run it in node... would be very helpful if this browser/DOM dependency could be refactored out. :)
I've also ended up having to implement an EventTarget
here so I'm bringing that over.
Also noticed this polyfill doesn't use theAbortSignal.onabort
handler defined in the spec.
While working on https://github.com/github/fetch/pull/592 and bringing this in to have a full-featured polyfill for testing, I noticed it doesn't work inside a web worker as it uses the
dom
to create anEventTarget
. Would you be willing to rework theEmitter
class to support that?