-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
forEach
is applied to all DOM Iterators
#988
Labels
Comments
Yes, you are right, thanks. |
DilwoarH
pushed a commit
to alphagov/content-publisher
that referenced
this issue
Jul 27, 2022
`.forEach` was incorrectly made available to all DOM Iterators in core-js. This has now been fixed in the package: zloirock/core-js#988 The recommended approach for HTMLCollections objects is to use `Array.from` (https://developer.mozilla.org/en-US/docs/Web/API/HTMLCollection). This has been applied to the code to support the `.forEach` function. This was originally noticed when updating the yarn.lock file in PR #2551. Credits: @ollietreend for finding the solution.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The README and compatibility test say that
'web.dom-collections.for-each'
is only forNodeList
andDOMTokenList
.The implementation applies it to all
dom-iterables
which includes much more than just those two.The text was updated successfully, but these errors were encountered: