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

Event/Custom Event polyfill? #354

Open
ajbowler opened this issue Nov 9, 2017 · 5 comments
Open

Event/Custom Event polyfill? #354

ajbowler opened this issue Nov 9, 2017 · 5 comments

Comments

@ajbowler
Copy link

ajbowler commented Nov 9, 2017

new Event() and new CustomEvent() don't work in older versions of IE.

The above link provides a solution and there's also custom-event-polyfill.

Are there any plans to add this to core-js/babel-polyfill?

@loganfsmyth
Copy link
Contributor

Generally Babel and core-js focus on polyfilling language-standard functionality. Polyfilling features from other specifications isn't something they look to handle for you.

@zloirock
Copy link
Owner

zloirock commented Dec 8, 2017

At this moment, only ECMAScript and closely related ECMAScript features in the scope of core-js. In the future, this position can be changed, but not soon.

@ajbowler
Copy link
Author

ajbowler commented Dec 9, 2017

That makes sense, thanks for your consideration at least!

@ItamarGronich
Copy link

@zloirock Hey, since now core-js tries to follow WHATWG standards group, i think it's a good idea to re-open this and implement The Event spec: https://dom.spec.whatwg.org/#interface-event
And the CustomEvent spec: https://dom.spec.whatwg.org/#customevent

What do you think?

@zloirock
Copy link
Owner

zloirock commented Mar 6, 2024

@ItamarGronich even in 2017 when this issue was created core-js had this group. However, this group contains cross-platform features that are pretty close to ECMAScript. I agree that it makes sense to extend it, see, for example, #1020

But at this moment there are many significantly closer to ECMAScript WHATWG features that it could be good to add to core-js sooner. URLPattren, new Observable, etc...

Anyway, ok, let's reopen it.

@zloirock zloirock reopened this Mar 6, 2024
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

4 participants