I have an arrow function that works fine on Chrome / Firefox, but I also need it to work on IE11, and I don't know what else to do.
Here you can see that arrow functions are not supported in IE11, so I tried changing my code from ES6 to ES5 here , because I read that this could solve the problems (you can also check my code from the link :) to remove arrow functions .
Object.entries is also not supported, and I still need it. https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
So I tried using the polyfill link above, but uses Reflect, which is also not supported. https://developer.mozilla.org/es/docs/Web/JavaScript/Reference/Global_Objects/Reflect
Any ideas? I really got lost with IE11 dev. PD: The code still works in Chrome / Firefox.
This is a naive implementation of Object.entries.It works well for all examples at https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
Object.entries = Object.entries || function(obj) { return Object.keys(obj).map(function(k) { return [k, obj[k]]; }); };
babel with a pre-set babel this will be the way to go.
, , , babel ( ES5) , .
ES8 + .
Webpack babel-transformers polyfills, . create-react-app next.js.
create-react-app
next.js
, IE11 , E2E/ SauseLabs, , TestCafe NightWatch.
Source: https://habr.com/ru/post/1681680/More articles:Паркет ClassCastException: паркет .io.MessageColumnIO не может быть отброшен в паркет .io.PrimitiveColumnIO - scalaDrag and Drop Async Data with Drag and Drop - iosGoogle API callback + 1 Button not working after Google update - javascriptHide fortune in Haskell - Laziset - haskellRemoving the same line in multiple viewports - vimНаименьшее число совершенных квадратных чисел, суммирующихся до n - algorithmCut a part of the array and raise the numeric key by the value x - arraysVSCode disable large folder warning - visual-studio-codeWhy vectors are created by an integer :: - typesIReadOnlyCollection vs ReadOnlyCollection - c #All Articles