Skip to content Skip to sidebar Skip to footer

Array.map Not Working In Ie9

I am trying to built a websocket application in IE9 but I have the following Javascript error: IE9 Console: SCRIPT438: Object doesn't support property or method 'map' websock.js,

Solution 1:

IE9 supports map, but most possibly your html page is rendered in quirks mode, that's why. Try adding a doctype, and see if that solves the problem.

Solution 2:

According to the ES5 compatibility table, IE9 does support Array#map. Visit http://kangax.github.com/es5-compat-table/ and look in the “This Browser” column.

Make sure the browser is in IE9 mode.

Solution 3:

FF implements map:

Array.prototype.hasOwnProperty('map') // true

IE doesn't implement map:

Array.prototype.hasOwnProperty('map') // false

Sorry, it seems you'll have to code your own map function.

Post a Comment for "Array.map Not Working In Ie9"