f / delorean

An Agnostic, Complete Flux Architecture Framework
749 stars 40 forks source link

Fixes unshimmable IE8 issues #86

Closed craigdallimore closed 9 years ago

craigdallimore commented 9 years ago

Hello! I'm having a good time with DeLorean, but alas I now need to extend my product support to IE8 and I uncovered a few minor issues.

Here are a few changes that can enable DeLorean to work with Internet Explorer 8.

Even shimmed, IE8 will still have issues with the default keyword:

screen shot 2015-06-06 at 10 10 33

As a workaround, I've simply used square bracket notation to access these properties: ['default']

I also discovered that the for .. in loop would iterate on shimmed properties:

screen shot 2015-06-06 at 10 16 49

To prevent this, I have introduced a hasOwnProperty check within the loop.

These changes - and es5-shim - are all that I have required to make DeLorean work with IE8.

Here is a gif of the sample app running in this vintage browser.

Please let me know your thoughts and if there is anything else I can do to help.

craigdallimore commented 9 years ago

Actually, I think I need to do a bit more - there are a number of for .. in loops to consider, and I just saw the __hasOwn helper, which I expect is preferred in this project.

craigdallimore commented 9 years ago

Oh boy. I might actually end up dropping this - it looks like the babel project might actually be able to do the transform I'm suggesting here, which would be an adequate solution for my needs.

Reference: Babel - ES3

What what it's worth, I was able to pass the tests in IE8 using a Windows 7 VM with es5-shim and es5-sham. Happy days.

craigdallimore commented 9 years ago

Closed - I suspect DeLorean doesn't need this.