Skip to content

Commit

Permalink
remove forEach from majority of DOM collection prototypes
Browse files Browse the repository at this point in the history
These appear to be added to address zloirock#329. However, only NodeList and
DOMTokenList are documented and tested to have forEach on their
prototypes.
  • Loading branch information
moorejs committed Sep 21, 2021
1 parent ed21ba3 commit c01268a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core-js/modules/web.dom-collections.for-each.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ var handlePrototype = function (CollectionPrototype) {
};

for (var COLLECTION_NAME in DOMIterables) {
handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);
if (DOMIterables[COLLECTION_NAME]) {
handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);
}
}

handlePrototype(DOMTokenListPrototype);

0 comments on commit c01268a

Please sign in to comment.