[英]IE 8 - Object doesn't support this property or method
I'm working on old IE Compatibility, specially IE 8. But, my JS is not working -> I got the Object doesn't support this property or method
error on my item item_tracked 我正在使用旧的IE兼容性,特别是IE8。但是,我的JS无法正常工作->我在我的项目item_tracked上发现
Object doesn't support this property or method
错误
;(function () {
setTimeout(function () {
currentItems().forEach(function (item_tracked) {
/* item_tracked here */
$(item_tracked.getView()).addClass('animated');
/* item_tracked problem here */
});
}, 500);
})();
any idea? 任何想法?
Assuming currentItems()
returns an Array, your problem is that IE8 does not support Array.prototype.forEach
. 假设
currentItems()
返回一个Array,则您的问题是IE8不支持Array.prototype.forEach
。
You could substite a for
loop or use a polyfill . 您可以替换
for
循环或使用polyfill 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.