HenrikJoreteg/emoji-images

Does not work with IE8

Closed this issue · 4 comments

IE8 and earlier does not have Array.prototype.indexOf method which is used here.

Is there any chance the compatibility will be added?

@Mithgol, I do not think that using a big external library is better than fix a line of code.

fixing IE8 and earlier by replacing them with chrome/firefox would be easier than telling all js-libs out there to re-write maybe 20% of their code. Sorry, but I can't understand why Array.prototype.indexOf is called something that needs to be fixed here.
He could replace it with lastIndexOf to provide support for firefox before 1.5 😆 But no hope for IE.

He'd need to add sth like this:

if (!Array.prototype.indexOf) {
  Array.prototype.indexOf = function (obj) {
    for (var i=0; i<this.length; i++) {
      if(this[i]==obj)
        return i;
      return -1;
    }
  }
}

But in my mind IE<=8 Users aren't worth such fixes, sorry. I'll not add sth like this in my similar project emoji-parser.

Ok, I've got the point. It seems that es5-shim is the only way to go.