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

IE 11 throws error "Error: Object doesn't support property or method 'submenupicker'" #54

Open
MikeMorkes opened this issue Apr 26, 2019 · 1 comment

Comments

@MikeMorkes
Copy link

Wondering if there is a polyfill solution? I have to support IE 11, unfortunately.

@aboveyunhai
Copy link

aboveyunhai commented Sep 18, 2019

Wondering if there is a polyfill solution? I have to support IE 11, unfortunately.

I am not sure if you are still wondering the solution.
The main issue is because the syntax of the script is using ES6(such as class constructor).
The quick and dirty solution is to go to https://babeljs.io/en/repl (or google "Babel") to convert the entire JavaScript to multiple language compatible.
Then add polyfill closest() (https://developer.mozilla.org/en-US/docs/Web/API/Element/closest) and polyfill Array.from() (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Polyfill) on top of the new code.
Then it should work out at least in IE 11.

But it might cause some other issues depends on how you used the javascript.

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