You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HTMLCollection haven't a .forEach method by the standard. In some recent core-js versions it was added because of a bug, but it was never documented. core-js adds .forEach only to DOMTokenList and NodeList from DOM collections.
const all = document.querySelectorAll('*') console.log('all', all) all.forEach(it => console.log(it)); // works const divs = document.getElementsByTagName('p') console.log('divs', divs) divs.forEach(div => { console.log('div', div) // error });
second forEach gives an error although debug notes says the polyfills are included:
Added following core-js polyfills:
es.array.for-each { "ie":"11" }
web.dom-collections.for-each { "ie":"11" }
Happens with babel7, webpack or rollup.
The text was updated successfully, but these errors were encountered: