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

Loader not working on IE11 #5

Open
JohanBeekers opened this issue Jan 7, 2019 · 3 comments
Open

Loader not working on IE11 #5

JohanBeekers opened this issue Jan 7, 2019 · 3 comments

Comments

@JohanBeekers
Copy link

Hi, i am currently extending an existing web application with a cornerstone viewer to show nifti files. Everything seems to work perfectly fine with Chrome, but IE11 is giving an error that 'Symbol' is undefined.

The same issue is also present in the example included with this library. (examples/orientation-check.html) It works when opened with Chrome, but not IE11.

I know 'Symbol' is something new in es6, though i'm not sure exactly what it does. I do use the es6-shim.js polyfill so i can use certain es6 functionality like Promises, but it appears that this does not support Symbol. I'm guessing it would work fine if my project would use something like typescript + core-js (which i have used before), but as i'm just extending an existing project, i really don't want to change the whole build process.
Would there be an easy way to get this to work with IE11?
Looking at the source, Symbol seems to be used as a different way of declaring methods? Could i just... change the source from, for example, "[determineMetaData] () {...}" to "function determineMetaData () {...}" and remove the symbols? Or are these things more complicated than they look at first sight?

Or is there maybe some other way of polyfilling them that i don't know of yet?

@swederik
Copy link
Member

swederik commented Jan 7, 2019

Tagging @fegemo because he originally added the Symbol usage. I think it was meant as a way to make the methods private.

You can probably polyfill Symbol. I don't think there's any issue with removing it.

@dannyrb
Copy link
Member

dannyrb commented Jan 7, 2019

Dropping this into your application should be a quick way to see if it's polyfillable:
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>

Docs: https://polyfill.io/v2/docs/

image

@JohanBeekers
Copy link
Author

Yes, thank you very very much. I never heard of polyfill.io before. We don't want our project to rely on a third party service, but i managed to use their API to create and download a polyfill file containing the minimum es6 functionality, including Symbols, that we need to get IE11 to work properly.

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