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.

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Billboard image

Imagine monitoring that's actually built for developers

Join Vercel, CrowdStrike, and thousands of other teams that trust Checkly to streamline monitor creation and configuration with Monitoring as Code.

Start Monitoring

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay