I'm using a javascript implementation of the gzip algorithm which works fine with Firefox and Chrome. But with Internet Explorer I got the following error:
Method forEach is not supported!
Code:
deflate.deflate(data, level).forEach(function (byte) {
putByte(byte, out);
});
I'm using Internet Explorer 9, which should support the forEach Method.
Any ideas?
Thank you very much!
You might try and extend the Array
object for browsers that don't support the foreach
method on it as suggested here Array.forEach
One example is:
if (!Array.prototype.forEach) {
Array.prototype.forEach = function(fn, scope) {
for(var i = 0, len = this.length; i < len; ++i) {
fn.call(scope, this[i], i, this);
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With