Anzeixer Solution for IE9
Closed this issue · 3 comments
Great Idea and Concept! I instantly wanted to use it for all our responsive projects, but IE9 doesn't support the used customEvent method and throws a error. (IE8 is unsupported too, but that's not much a problem for us..)
After some research I've found a nice workaround with a custom event polyfill from MDN (https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent?redirectlocale=en-US&redirectslug=Web%2FAPI%2FEvent%2FCustomEvent#Browser_compatibility)
So I load the polyfill inside a ie conditional like this:
<!--[if !IE]><!-->
<script src="js/Anzeixer/src/anzeixer.js"></script>
<!--<![endif]-->
<!--[if gte IE 9]>
<script src="js/custom-event-polyfill.js"></script>
<script src="js/Anzeixer/src/anzeixer.js"></script>
<![endif]-->
@monobasic Thanks, I'll have a look at it!
I just realize: IE10 doesn't parses condtional comments any more.. so "!IE" will target IE10 too. I'll need a different solution for loading the polyfill based on the browser..
IE support added, thanks to @monobasic.