0

I have the below Javascript function

function readMore(details) {    
  let dots = document.querySelector(`.notificationCard[data-details="${details}"] .notificationDots`);
}

This works fine in Chrome and Firefox but IE11 is throwing an invalid character error for `. Can someone please tell me what I am doing wrong here.

Thanks

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
SP1
  • 1,182
  • 3
  • 22
  • 47
  • 3
    No version of IE supports template literals. You will need to use classic string concatenation if you need this to work in IE – Rory McCrossan Aug 10 '20 at 16:14
  • 1
    https://caniuse.com/#search=template%20literals — better yet, _use_ template literals to "encourage" people to _stop using" IE. IE is dead. (I know, , "I have to support IE, my company uses it") – Stephen P Aug 10 '20 at 16:20

0 Answers0