1
|
require('./es6.array.iterator');
|
2
|
var global = require('./_global');
|
3
|
var hide = require('./_hide');
|
4
|
var Iterators = require('./_iterators');
|
5
|
var TO_STRING_TAG = require('./_wks')('toStringTag');
|
6
|
|
7
|
var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
|
8
|
'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
|
9
|
'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
|
10
|
'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
|
11
|
'TextTrackList,TouchList').split(',');
|
12
|
|
13
|
for (var i = 0; i < DOMIterables.length; i++) {
|
14
|
var NAME = DOMIterables[i];
|
15
|
var Collection = global[NAME];
|
16
|
var proto = Collection && Collection.prototype;
|
17
|
if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
|
18
|
Iterators[NAME] = Iterators.Array;
|
19
|
}
|