![](/img/trans.png)
[英]IE11 Object doesn't support property or method 'Symbol(Symbol.iterator)_a.2p3bca3ct9h
[英]In IE11 Symbol.Iterator is giving error when i am using for each on array of elements?
我試圖循環一個按鈕數組並在運行時創建react component按鈕,該錯誤僅在IE 11中可再現,我在Symbol中遇到錯誤。 迭代器,這意味着我傳遞的數組無效,並且無法返回內部迭代器,但這在任何其他瀏覽器上都可以正常工作,是否是IE的問題,或者我正在使用jQuery選擇器來獲取按鈕數組。
export default function(buttons){
for(let button of buttons){
//Code for creating button as react component button.
}
}
//call to replaceButtons
var btns = $('.continue-buttons');
replaceButtons(btns);
SYMBOL.ITERATOR出現錯誤
我知道這不是編寫響應代碼的優化方法,但是需求和設計是一個很大的挑戰。
jQuery不返回數組,而是返回jQuery集合。 確實這不是迭代的。 實際上是從v1.12 / v2.2開始。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.