cornerstone-nifti-image-loader
cornerstone-nifti-image-loader copied to clipboard
Loader not working on IE11
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?
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.
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/
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.