ilyashubin/scrollbooster

It doesn't work in Edge as stated in documentation

kikky7 opened this issue · 1 comments

Your github example also doesn't work in Edge.

JS error: Expected identifier, string or number

EDIT: it also doesn't work in IE11

@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.