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

IE11: Syntax error #8

Closed
samwx opened this issue Apr 11, 2018 · 6 comments
Closed

IE11: Syntax error #8

samwx opened this issue Apr 11, 2018 · 6 comments
Assignees
Milestone

Comments

@samwx
Copy link
Contributor

samwx commented Apr 11, 2018

Syntax error caused by code above:

class googleCharts {
    [loadScript]() {
....

Using "normal" syntax (without [], and Symbol) worked, like

class googleCharts {
    loadScript() {
....

Any reasons to use Symbol instead of class name?

@KoenDierckx
Copy link

I just ran into the same issue

@mmathias01
Copy link
Owner

using Symbol is designed to enforce the singularity of the object. Typically you would use this module in an environment that would get transpiled with babel or the like into something compatible with whatever your browser targets are. That being said I could look at providing a pre-transpiled version.

@KoenDierckx
Copy link

I'm using this within a Rails application, using webpack(er)
It works fine in Chrome, but not in Firefox and IE

@noelmccrory
Copy link

According to facebook/create-react-app#1125 - "We don't recommend using libraries that don't precompile their code to ES5 but are supposed to be usable in ES5."

For now, I've updated my babel config to transpile the google-charts module. But have a pre-transpiled version would be great.

@mmathias01
Copy link
Owner

I am looking into a pre-transpiled version for 1.5.1

@mmathias01 mmathias01 added this to the 1.5.1 milestone Jul 12, 2018
@mmathias01 mmathias01 self-assigned this Jul 12, 2018
@mmathias01
Copy link
Owner

This should work now

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