fxa / uritemplate-js

An javascript implementation of RFC6570 Uri Templates
MIT License
97 stars 20 forks source link

Not working with IE9 with IE7 quarks mode. #11

Closed anozaki closed 11 years ago

anozaki commented 11 years ago

change text[ index ] to text.charAt(index)

fxa commented 11 years ago

Hi anozaki! Thank you for your investigation. I found only one usage, in isPercentDigitDigit (but there 3 times in a line!). I am confused a little bit, that jshint did not find it. I thought, jshint checks ES5 compatibility. Now I am working on an extract method and made heavy changes therefore. So I will have to branch. It will need some days, until I can fix and checkin the bugfix Sorry for that

anozaki commented 11 years ago

I think one more spot. pctCharAt uses it first line.

"text[index]" is valid in ES5... IE7 is just broken in a lot of ways. Another example is Array.indexOf, IE7 doesn't have it, but have String.indexOf. So, I don't really now how you would check against some of these things automatically.

I've made a copy for now so not a big deal. Just wanted to put something here for others.

RationalGeek commented 11 years ago

I am also running into the issue that pctCharAt fails in IE 8 quirks mode. Causing this issue in Glimpse codebase:

https://github.com/Glimpse/Glimpse/issues/335

Any idea when you will have a fix?

avanderhoorn commented 11 years ago

@fxa Just wondering if you have any updates on when this might be fixed?

fxa commented 11 years ago

Just fixed it! There were more problems with IE6 quirks mode than I thought, not only the string[]

avanderhoorn commented 11 years ago

Fantastic. Pulling over the latest changes now. Thanks again!