IE8 compatibility
As reported in #30, IE8 shows Object doesn't support property or method 'addEventListener'
Nice :+1:
Maybe something like this would help: https://github.com/WebReflection/ie8
@9mm, does the code in https://github.com/carlsednaoui/ouibounce/compare/ie8 fix the ie8 bug? I'll find a way to test locally in the coming days.
Sorry for delay, i'll check it out today.
When I used the code from there (minified version) I got
Object doesn't support property or method 'reduce'
Oh yeah IE8 doesnt support array.reduce haha. You probably just want to use an es5 shim with this library like this one: https://github.com/es-shims/es5-shim
Unless you want to worry about legacy js engines @carlsednaoui I might add a note that you'll need an es5 shim if you're running on ie8 or earlier to the readme?
Thanks for the review @9mm.
Good call @jenius, I really don't want to deal with legacy stuff. Will add the es5-shims to the README.
I'm currently using v0.0.9 so this issue may be different in v0.0.10 however the above listed fix is actually insufficient and just moves the problem to Line 28 because IE7+8 do not understand addEventListener. I was able to fix the issue by adding in another shim (https://github.com/jwmcpeak/EventShim) on top of the es5-shim mentioned above. Obviously considering the unfortunately high amount of IE8 users still in the wild this is less than ideal when a solution like the one shown here: http://stackoverflow.com/questions/9769868/addeventlistener-not-working-in-ie8 seems pretty straight forward. I may attempt to construct a fix but I am currently pressed for time and figured at least bringing it up would be better than letting someone else suffer with it.
A screenshot showing the bug: http://i.imgur.com/6cXUI3D.png
Cool, looks like potentially adding the event shim to the caveats as well might help. As these shims continue rolling in, it might be worth it for us to add a new build file called shims or something that rolls them all into one place, but that the user can choose to include or not at their own discretion.
Re-opening. @jenius wanna pair on this when I'm back Stateside? :hamburger:
Sure, just let me know!