jjzjj

HTMLCollections

全部标签

javascript - HTMLCollections 可以用 for...of (Symbol.iterator) 迭代吗?

DOM4使NodeList可迭代:interfaceNodeList{getterNode?item(unsignedlongindex);readonlyattributeunsignedlonglength;iterableNode>;};根据WebIDL,这意味着Objectsimplementinganinterfacethatisdeclaredtobeiterablesupportbeingiteratedovertoobtainasequenceofvalues.Note:IntheECMAScriptlanguagebinding,aninterfacethatisit