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, line 211 character 5
websock.js function:
function send_string(str) {
//Util.Debug(">> send_string: " + str);
api.send(str.split('').map(
function (chr) { return chr.charCodeAt(0); } ) );
}
Also in IE9 console str = the text I entered
. and if I try to split it first then I get the correct array of the string but still map is not working.
For example if I try to send "text":
str.split("") = ['t','e','x','t']
And I found this in the console. But unfortunately .map is not working. Any suggestions?
PS:
I tried to change the w3school code this link:
document.write(str.split("").map(
function (chr) { return chr.charCodeAt(0); } ) + "<br />");
And map is working here with the desirable result using IE9!