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

Internet Explorer requires Event polyfill #16

Closed
nerdstep opened this issue Aug 20, 2019 · 2 comments · Fixed by #17
Closed

Internet Explorer requires Event polyfill #16

nerdstep opened this issue Aug 20, 2019 · 2 comments · Fixed by #17

Comments

@nerdstep
Copy link
Contributor

nerdstep commented Aug 20, 2019

Internet Explorer breaks due to usage of the new Event constructor.

It works fine after adding a polyfill, but it was somewhat difficult to track this issue down since the error appears as originating in react-dom, and at least with a Create React App bootstrapped app, you can't easily test IE in development.

So testing the production build you get this useful error:

SCRIPT445: Object doesn't support this action
react-dom.production.min.js (169,13)

Initially I was trying to figure out why Babel/core-js wasn't polyfilling this but it seems they're not focused on DOM related APIs.

Anyway, I'm opening this issue because it might help others avoid similar grief trying to debug the problem. Perhaps a quick mention in the README would be warranted?

@quantizor
Copy link
Owner

Ooh interesting. Thanks for surfacing this! Would you be interested in doing a readme PR?

@nerdstep
Copy link
Contributor Author

Sure thing!

As a point of further discussion, it might be more "correct" to use the CustomEvent API instead of Event.

Either way, both require a polyfill to support IE, though it is fairly minimal.

quantizor pushed a commit that referenced this issue Aug 20, 2019
Covers polyfill requirements to support Internet Explorer.
Resolves #16
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

Successfully merging a pull request may close this issue.

2 participants