1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-23 19:23:18 +00:00
musix-oss/node_modules/core-js/modules/web.dom-collections.for-each.js

16 lines
619 B
JavaScript
Raw Normal View History

2019-10-10 13:43:04 +00:00
var global = require('../internals/global');
var DOMIterables = require('../internals/dom-iterables');
var forEach = require('../internals/array-for-each');
var hide = require('../internals/hide');
for (var COLLECTION_NAME in DOMIterables) {
var Collection = global[COLLECTION_NAME];
var CollectionPrototype = Collection && Collection.prototype;
// some Chrome versions have non-configurable methods on DOMTokenList
if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
hide(CollectionPrototype, 'forEach', forEach);
} catch (error) {
CollectionPrototype.forEach = forEach;
}
}