1 | 'use strict';
|
2 | var global = require('../internals/global');
|
3 | var DOMIterables = require('../internals/dom-iterables');
|
4 | var DOMTokenListPrototype = require('../internals/dom-token-list-prototype');
|
5 | var forEach = require('../internals/array-for-each');
|
6 | var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
|
7 |
|
8 | var handlePrototype = function (CollectionPrototype) {
|
9 |
|
10 | if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
|
11 | createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
|
12 | } catch (error) {
|
13 | CollectionPrototype.forEach = forEach;
|
14 | }
|
15 | };
|
16 |
|
17 | for (var COLLECTION_NAME in DOMIterables) {
|
18 | if (DOMIterables[COLLECTION_NAME]) {
|
19 | handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);
|
20 | }
|
21 | }
|
22 |
|
23 | handlePrototype(DOMTokenListPrototype);
|