mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-12 05:31:41 +00:00
update
This commit is contained in:
58
node_modules/core-js/modules/web.dom.iterable.js
generated
vendored
Normal file
58
node_modules/core-js/modules/web.dom.iterable.js
generated
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
var $iterators = require('./es6.array.iterator');
|
||||
var getKeys = require('./_object-keys');
|
||||
var redefine = require('./_redefine');
|
||||
var global = require('./_global');
|
||||
var hide = require('./_hide');
|
||||
var Iterators = require('./_iterators');
|
||||
var wks = require('./_wks');
|
||||
var ITERATOR = wks('iterator');
|
||||
var TO_STRING_TAG = wks('toStringTag');
|
||||
var ArrayValues = Iterators.Array;
|
||||
|
||||
var DOMIterables = {
|
||||
CSSRuleList: true, // TODO: Not spec compliant, should be false.
|
||||
CSSStyleDeclaration: false,
|
||||
CSSValueList: false,
|
||||
ClientRectList: false,
|
||||
DOMRectList: false,
|
||||
DOMStringList: false,
|
||||
DOMTokenList: true,
|
||||
DataTransferItemList: false,
|
||||
FileList: false,
|
||||
HTMLAllCollection: false,
|
||||
HTMLCollection: false,
|
||||
HTMLFormElement: false,
|
||||
HTMLSelectElement: false,
|
||||
MediaList: true, // TODO: Not spec compliant, should be false.
|
||||
MimeTypeArray: false,
|
||||
NamedNodeMap: false,
|
||||
NodeList: true,
|
||||
PaintRequestList: false,
|
||||
Plugin: false,
|
||||
PluginArray: false,
|
||||
SVGLengthList: false,
|
||||
SVGNumberList: false,
|
||||
SVGPathSegList: false,
|
||||
SVGPointList: false,
|
||||
SVGStringList: false,
|
||||
SVGTransformList: false,
|
||||
SourceBufferList: false,
|
||||
StyleSheetList: true, // TODO: Not spec compliant, should be false.
|
||||
TextTrackCueList: false,
|
||||
TextTrackList: false,
|
||||
TouchList: false
|
||||
};
|
||||
|
||||
for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
|
||||
var NAME = collections[i];
|
||||
var explicit = DOMIterables[NAME];
|
||||
var Collection = global[NAME];
|
||||
var proto = Collection && Collection.prototype;
|
||||
var key;
|
||||
if (proto) {
|
||||
if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
|
||||
if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
|
||||
Iterators[NAME] = ArrayValues;
|
||||
if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user