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

Potential fix for the IE 11 #2

Closed
wants to merge 2 commits into from
Closed

Potential fix for the IE 11 #2

wants to merge 2 commits into from

Conversation

nulladdict
Copy link

@nulladdict nulladdict commented Feb 16, 2021

Follow up to #1

It seems, that minimal required change would be checking if typeof Event is "object".

It should be "function" in all browsers that support new Event() (I am referring to this quite old stackoverflow question), although I'm not quite sure how safe this actually is.

@levymetal
Copy link

Works for me in IE11. Should be safe, Event needs to polyfilled or monkeypatched if it isn't callable. Perhaps typeof root.Event !== "function" would more intuitively infer the intent.

The other issue is that it isn't transpiled to ES5 so breaks in IE11. IMHO it makes sense for polyfills to target ES5 & it's relatively trivial with a Babel prepublish script but keen to hear Ben's thoughts.

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 this pull request may close these issues.

None yet

2 participants