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

It doesn't work in Edge as stated in documentation #43

Open
kikky7 opened this issue Apr 21, 2020 · 1 comment
Open

It doesn't work in Edge as stated in documentation #43

kikky7 opened this issue Apr 21, 2020 · 1 comment

Comments

@kikky7
Copy link

kikky7 commented Apr 21, 2020

Your github example also doesn't work in Edge.

JS error: Expected identifier, string or number

EDIT: it also doesn't work in IE11

@bramdoppen
Copy link
Contributor

@kikky7
For IE11 the issue is probably with the use of arrow functions. IE doesn't support those.

For example:

onUpdate: (state) => {
    content.style.transform = `translate(
      ${-state.position.x}px,
      ${-state.position.y}px
    );
},

Should be changed into the following code to work on IE11:

onUpdate: function (state) {
     content.style.transform = "translate(" + -state.position.x + "px," + -state.position.y + "px )";
},

When you need to support IE11 you can also choose to implement a code transpiler like babel.js.

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

No branches or pull requests

2 participants