You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
918 B
24 lines
918 B
'use strict';
|
|
var globalThis = require('../internals/global-this');
|
|
var DOMIterables = require('../internals/dom-iterables');
|
|
var DOMTokenListPrototype = require('../internals/dom-token-list-prototype');
|
|
var forEach = require('../internals/array-for-each');
|
|
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
|
|
|
|
var handlePrototype = function (CollectionPrototype) {
|
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
|
|
createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
|
|
} catch (error) {
|
|
CollectionPrototype.forEach = forEach;
|
|
}
|
|
};
|
|
|
|
for (var COLLECTION_NAME in DOMIterables) {
|
|
if (DOMIterables[COLLECTION_NAME]) {
|
|
handlePrototype(globalThis[COLLECTION_NAME] && globalThis[COLLECTION_NAME].prototype);
|
|
}
|
|
}
|
|
|
|
handlePrototype(DOMTokenListPrototype);
|