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.

Runner H image

Automate Your Workflow in Slack, Gmail, Notion & more

Runner H connects to your favorite tools and handles repetitive tasks for you. Save hours daily. Try it free while it’s in beta.

Try for Free

Top comments (0)

👋 Kindness is contagious

Explore this insightful write-up, celebrated by our thriving DEV Community. Developers everywhere are invited to contribute and elevate our shared expertise.

A simple "thank you" can brighten someone’s day—leave your appreciation in the comments!

On DEV, knowledge-sharing fuels our progress and strengthens our community ties. Found this useful? A quick thank you to the author makes all the difference.

Okay