Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

IE8 compatibility #31

Open
carlsednaoui opened this issue May 12, 2014 · 11 comments
Open

IE8 compatibility #31

carlsednaoui opened this issue May 12, 2014 · 11 comments
Assignees
Labels

Comments

@carlsednaoui
Copy link
Owner

As reported in #30, IE8 shows Object doesn't support property or method 'addEventListener'

@carlsednaoui carlsednaoui self-assigned this May 12, 2014
@9mm
Copy link

9mm commented May 12, 2014

Nice 👍

@jescalan
Copy link
Contributor

Maybe something like this would help: https://github.com/WebReflection/ie8

@carlsednaoui
Copy link
Owner Author

@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.

@9mm
Copy link

9mm commented May 14, 2014

Sorry for delay, i'll check it out today.

@9mm
Copy link

9mm commented May 15, 2014

When I used the code from there (minified version) I got

Object doesn't support property or method 'reduce'

@jescalan
Copy link
Contributor

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?

@carlsednaoui
Copy link
Owner Author

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.

@nathanielban
Copy link

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

@jescalan
Copy link
Contributor

jescalan commented Oct 8, 2014

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.

@carlsednaoui
Copy link
Owner Author

Re-opening. @Jenius wanna pair on this when I'm back Stateside? 🍔

@carlsednaoui carlsednaoui reopened this Oct 8, 2014
@jescalan
Copy link
Contributor

jescalan commented Oct 8, 2014

Sure, just let me know!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants