Merge pull request #11598 from Snuffleupagus/polyfill-Map-Set-iteration
Add polyfills to support iteration of `Map` and `Set`
This commit is contained in:
commit
f6ffc2bf37
@ -283,6 +283,26 @@ if (
|
||||
globalThis.ReadableStream = require("web-streams-polyfill/dist/ponyfill.js").ReadableStream;
|
||||
})();
|
||||
|
||||
// We want to support Map iteration, but it doesn't seem possible to easily
|
||||
// test for that specifically; hence using a similarly unsupported property.
|
||||
// Support: IE11
|
||||
(function checkMapEntries() {
|
||||
if (globalThis.Map && globalThis.Map.prototype.entries) {
|
||||
return;
|
||||
}
|
||||
globalThis.Map = require("core-js/es/map/index.js");
|
||||
})();
|
||||
|
||||
// We want to support Set iteration, but it doesn't seem possible to easily
|
||||
// test for that specifically; hence using a similarly unsupported property.
|
||||
// Support: IE11
|
||||
(function checkSetEntries() {
|
||||
if (globalThis.Set && globalThis.Set.prototype.entries) {
|
||||
return;
|
||||
}
|
||||
globalThis.Set = require("core-js/es/set/index.js");
|
||||
})();
|
||||
|
||||
// Support: IE<11, Safari<8, Chrome<36
|
||||
(function checkWeakMap() {
|
||||
if (globalThis.WeakMap) {
|
||||
|
Loading…
Reference in New Issue
Block a user