Apparently JS implementation in IE9 contains (IMO, critical) bug in handling array literals.
In IE9 in some cases this code:
var a = [1,2,3,4,];
will create array of length 5 with last element equals to undefined
.
Here are two versions of my KiTE engine test pages:
- http://terrainformatica.com/kite/test-kite.htm - works in IE9
- http://terrainformatica.com/kite/test-kite-ie9-bug.htm - fails in IE9
The only difference is that first document contains data.contacts property initialized as [1,2,3,4]
and second one as [1,2,3,4,]
.
Internal IE debugger reports that data.contacts
array contains 5 elements in second case. Without debugger this code fails at line 98 in kite.js (trying to get property of undefined
- fifth element of that data.content array )
Questions:
- How and where people usually report bugs in IE?
- Have you seen anything similar to this problem? I am looking for simplest case where this problem is reproducible.
Update: here is the test http://jsfiddle.net/hmAms/ where all browsers (IE9 included) agree on the fact that var a = [1,2,3,4,];
is of length 4.