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

EventTarget #1039

Open
make-github-pseudonymous-again opened this issue Jan 14, 2022 · 10 comments
Open

EventTarget #1039

make-github-pseudonymous-again opened this issue Jan 14, 2022 · 10 comments

Comments

@make-github-pseudonymous-again

EventTarget does not exist in Node < 16. Example.

Some existing polyfills:

@zloirock
Copy link
Owner

I'll think makes it sense or not, thanks.

@make-github-pseudonymous-again
Copy link
Author

make-github-pseudonymous-again commented Jan 14, 2022

Note: it is listed as experimental starting with Node 14.5 but I cannot find the flag to enable it (in Node 14.18).

@zloirock zloirock changed the title feature: EventTarget EventTarget Jan 15, 2022
@joshxyzhimself
Copy link

Hi, a bit similar, I was looking for a polyfill of Headers which has long been supported in browsers but just recently in v18 of Node.js. Its API is quite similar to URLSearchParams though.

@ologbonowiwi
Copy link

We still need this?

I'm thinking about do some research on this one

@zloirock
Copy link
Owner

Yes, it's still required and can be useful for some other features.

@ologbonowiwi
Copy link

ologbonowiwi commented May 27, 2023

Which node version do we need to cover @zloirock?

@zloirock
Copy link
Owner

All possible.

@ologbonowiwi
Copy link

EventTarget API Specification: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget
Implementation example found on stack overflow: https://stackoverflow.com/a/51982980

@zloirock
Copy link
Owner

zloirock commented Jul 2, 2023

EventTarget API Specification: developer.mozilla.org/en-US/docs/Web/API/EventTarget

EventTarget API Specification: https://dom.spec.whatwg.org/#interface-eventtarget

Implementation example found on stack overflow: stackoverflow.com/a/51982980

It's not the best place to look for polyfills code -)

@cristian-atehortua
Copy link

A nice implementation: https://github.com/mysticatea/event-target-shim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants