Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support web workers #11

Closed
joaovieira opened this issue Feb 2, 2018 · 2 comments
Closed

Support web workers #11

joaovieira opened this issue Feb 2, 2018 · 2 comments

Comments

@joaovieira
Copy link
Contributor

joaovieira commented Feb 2, 2018

While working on JakeChampion/fetch#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 an EventTarget. Would you be willing to rework the Emitter class to support that?

screen shot 2018-02-02 at 01 16 20

@getify
Copy link

getify commented Feb 2, 2018

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. :)

@joaovieira
Copy link
Contributor Author

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.

@mo mo closed this as completed in #12 Feb 4, 2018
mo added a commit that referenced this issue Feb 22, 2018
See also github issue #11: "Support web workers"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants