DEV Community

Gabriel Alejandro López López
Gabriel Alejandro López López

Posted on • Originally published at glpzzz.dev on

Modern JavaScript that Internet Explorer 11 dislikes

Yesterday I was call to fix some issues on a website I “fixed” some weeks ago. Main thing was to update the theme (Wordpress). They had a lot of old stuff, 3rd party libraries and the sort of stuff that you can expect of something written on 2017.

The biggest change was migrating forms validation to checking values on change, and before submit to the native HTML5 validation techniques.

And as part of the job I started to write the JavaScript code using the native features instead of jQuery or other “tricks”.

Now, I have to fix some stuff again because on 2021 there is some people still using Internet Explorer 11 (IE11).

Things that does not work:

  • Arrow functions
    • changed to old function() functions
  • {variable} interpolation
    • changed to old Array.prototype.replace()
  • native Array.prototype.forEach()
    • changed to $.each() from jQuery (good in the context)
  • native String.prototype.replaceAll()
    • changed to String.prototype.replace(RegExp, string)

The list is in construction…

PS: Thanks to my colleagues epgeroy and geekmidget for the remote debugging as I don’t have IE11 on my Ubuntu machine.

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay