From a91a047d73956d657142fe069c103bdf0a8bf123 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 16 Jan 2018 18:15:08 +0100 Subject: [PATCH] more polyfill for IE --- www/common/sframe-boot2.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/common/sframe-boot2.js b/www/common/sframe-boot2.js index fe614ba33..697f22a91 100644 --- a/www/common/sframe-boot2.js +++ b/www/common/sframe-boot2.js @@ -18,6 +18,14 @@ define([ Number.MAX_SAFE_INTEGER = 9007199254740991; } + if (typeof(window.Symbol) !== 'function') { + var idCounter = 0; + var Symbol = window.Symbol = function Symbol(key) { + return '__' + key + '_' + Math.floor(Math.random() * 1e9) + '_' + (++idCounter) + '__'; + }; + Symbol.iterator = Symbol('Symbol.iterator'); + } + var mkFakeStore = function () { var fakeStorage = { getItem: function (k) { return fakeStorage[k]; },