I have an arrow function that was working perfectly on Chrome/Firefox but I also need it working on IE11, and I don't know what more to do.
Here you can see that the arrow functions aren't supported on IE11, so I tried to change my code from ES6 to ES5 here because I read that doing this could solve the problems (on the link you can also check my code :) for removing the arrow functions.
Object.entries isn't supported either, and I'm still needing it. https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
So I tried to use the polyfill of the link above but it uses Reflect which isn't supported either. https://developer.mozilla.org/es/docs/Web/JavaScript/Reference/Global_Objects/Reflect
Any ideas? I'm really lost with IE11 dev. PD: The code is still working on Chrome/Firefox.
On June 15, 2022, the Internet Explorer 11 desktop application is no longer be supported on certain versions of Windows 10*. Customers are encouraged to move to Microsoft Edge, which provides support for legacy and modern websites and apps.
This is a reminder that Microsoft plans to retire and end support for the Internet Explorer 11 (IE11) desktop application on most versions of Windows 10 on June 15, 2022.
Support for Internet Explorer 11 has ended on June 15, 2022Microsoft Edge is the faster, more secure browser recommended by Microsoft. With improved security, privacy, speed, and ease of use, Microsoft Edge surpasses the experience you've come to know with Internet Explorer.
If you can't open Internet Explorer, if it freezes, or if it opens briefly and then closes, the problem might be caused by low memory or damaged system files. Try this: Open Internet Explorer and select Tools > Internet options. Select the Advanced tab, and then select Reset.
This is naive implementation of Object.entries.
It works well for all examples in 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 babel preset env would be the way to go.
This way you could just list the browsers you intend to support and then babel will only transpile (convert pieces of your code to ES5) parts of your code that need to be converted to support all your browsers.
You can use several solution to implement support new ES8+ features in old browsers.
Full-circuit solution can be based on Webpack with babel-transformers and set of polyfills, which also called shims. You can see stereotypical configuration in create-react-app
or next.js
boilerplate.
More that, if you have no IE11 installation on development machine, you can run E2E/functional tests on SauseLabs, using test suite provider like TestCafe or NightWatch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With