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

Issue in IE 11 #32

Open
flo720 opened this issue Jan 25, 2019 · 3 comments
Open

Issue in IE 11 #32

flo720 opened this issue Jan 25, 2019 · 3 comments

Comments

@flo720
Copy link

flo720 commented Jan 25, 2019

Hi,

I have an issue with bunnyJS and Internet Explorer 11. When i test on IE 11, I have multiple issues about functions in constant. For exemple, we have an error "SCRIPT1002" in BunnyElement.js, line 4

export const BunnyElement = {

  getCurrentDocumentPosition(top = true) {
    //return Math.abs(document.body.getBoundingClientRect().y);
    return top ? window.scrollY : window.scrollY + window.innerHeight;
  },
[...]
}

We use webpack Encore, and we add babel polyfill. But it still not working.

Thank you very much

@Apostata
Copy link

Same Here, but with different type of error: SCRIPT1003: Expected ':' in line 12 of bunnyjs/src/file/file.js
i'm using @babel/polyfill too and still the same.

Thanks in advance.

@Apostata
Copy link

I my case, I was able to solve using the dist file: bunny-js/dist/validation.min.js.
Then, I made a copy of then minified file and where variables are defined as var, I change to window.{varName} and import has a module.
import '../third-party/bunnyJs/validation.min';

@Mevrael
Copy link
Owner

Mevrael commented May 18, 2019

I suppose apart from Babel Polyfill you also have to transpile ES6 syntax into ES5 for IE11. You might use Laravel Mix, assets-builder or Webpack for that.

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

3 participants