0

I have come across an error in IE8 using this js:

http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/highlight.min.js

SCRIPT438: Object doesn't support property or method 'forEach' File: highlight.min.js, Line: 1, Column: 5879

Is there a way to fix this, so that the page works in IE8? Many thanks

user2713512
  • 241
  • 1
  • 5
  • 16
  • Well if it is using forEach, that means the developer is not supporting IE8. You can use the pollyfill https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach, but who know what else is going to be broken. – epascarello Oct 01 '14 at 13:45
  • This might help: http://stackoverflow.com/questions/2790001/fixing-javascript-array-functions-in-internet-explorer-indexof-foreach-etc – bluelDe Oct 01 '14 at 13:46

1 Answers1

0

As per Array.prototype.forEach MDN doc, it is available from only IE 9. So you may have to use the polyfill given in the same page.

thefourtheye
  • 233,700
  • 52
  • 457
  • 497