Version 1
[yaffs-website] / node_modules / core-js / library / modules / web.dom.iterable.js
diff --git a/node_modules/core-js/library/modules/web.dom.iterable.js b/node_modules/core-js/library/modules/web.dom.iterable.js
new file mode 100644 (file)
index 0000000..e56371a
--- /dev/null
@@ -0,0 +1,13 @@
+require('./es6.array.iterator');
+var global        = require('./_global')
+  , hide          = require('./_hide')
+  , Iterators     = require('./_iterators')
+  , TO_STRING_TAG = require('./_wks')('toStringTag');
+
+for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
+  var NAME       = collections[i]
+    , Collection = global[NAME]
+    , proto      = Collection && Collection.prototype;
+  if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
+  Iterators[NAME] = Iterators.Array;
+}
\ No newline at end of file