在发布另外一个问题,这是有:MS Edge为什么不使用spread元素和querySelector?
this.products = [...document.querySelectorAll('.product')];
边缘将失败,并出现以下错误:
function expected
但是这是工作:
var params = ['hello', '', 7];
var other = [ 1, 2, ...params];
为什么没有顶一个在Edge上工作(它在Chrome上)?
你试过'[...(document.querySelectorAll('。product'))]'? –
我对您的建议做了,不工作! – Mouser
Edge可能不会为'NodeList'实现迭代器协议? *编辑:*是:https://developer.mozilla.org/en-US/docs/Web/API/NodeList#Browser_compatibility(至少它不支持'entries()','values()'等,如果它支持迭代器协议,我相信它会。)。 –