| Issue 5: | Live example doesn't work in IE6 | |
| 3 people starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? 1. Run jslint on json-template.js What is the expected output? What do you see instead? Lint at line 376 character 25: Extra comma. 'space': ' ', What version of the product are you using? On what operating system? Windows IE6 Please provide any additional information below. You mentioned in the demo that it doesn't work in IE6 so I thought I would check it out. First it didn't work but didn't give any debugger info, so I ran the script through jslint, and it found an extra comma at the end of one of your objects: Lint at line 376 character 25: Extra comma. 'space': ' ', Then after removing that comma, it was giving me a debugger error, but I haven't quite figured that out. Attaching debugger screenshot for your info.
Mar 31, 2009
Project Member
#1
gtempacc...@yahoo.com
Summary:
Live example doesn't work in IE6
Apr 6, 2009
The major reason IE6 is not working is that the String.prototype.split method does not return captured groups in the result. For reference see http://blog.stevenlevithan.com/archives/cross-browser-split. The other reason is that IE6 does not let you index strings as an array, so "token[0]" needs to be replaced with "token.charAt(0)" in function "_Compile". These two changes make it work in IE6
Apr 6, 2009
Great thanks. I'm not sure if it's better to include that fix or just write a loop by hand to tokenize it... the regex is pretty simple, so maybe we can get rid of it. I will look at it this week (patches are welcome too).
Status:
Accepted
Apr 6, 2009
Didn't have time to look into it further, just thought i'd let you know where the problem arises. I think if you'd do a "match" instead of a "split" it is basically fixed... I will see if i have some time to look into it..
Apr 20, 2009
Thanks, your suggestions were spot on.
Status:
Fixed
|