Skip to content
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

remove forEach from majority of DOM collection prototypes #987

Merged
merged 1 commit into from Sep 21, 2021

Conversation

moorejs
Copy link
Contributor

@moorejs moorejs commented Sep 21, 2021

Issue #988.

An alternative to this PR is to expand the compatibility test to include all the DOM Iterables.

I wasn't sure how you would want this change, so I have an simpler implementation here.

These appear to be added to address zloirock#329. However, only NodeList and
DOMTokenList are documented and tested to have forEach on their
prototypes.
@moorejs moorejs changed the title remove {forEach, keys, values, entries } from majority of DOM collection prototypes remove forEach from majority of DOM collection prototypes Sep 21, 2021
@zloirock zloirock merged commit 74f441d into zloirock:master Sep 21, 2021
@zloirock zloirock added the bug label Sep 21, 2021
@chenyulun
Copy link

Why not remove it from 4.x.x?

@zloirock
Copy link
Owner

zloirock commented Nov 9, 2021

The comment above explains why. Because it's a bug, it's missed in any spec or proposal, it's not documented, more other - code comments say that it should not be here, because the additional time of its availability could cause new cases of incorrect usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants