0
htmlStr = '<div xmlns="http://www.w3.org/1999/xhtml" data-autoplay><div>'
node = new DOMParser().parseFromString(htmlStr, "text/xml");

Above code throws error because data-autoplay doesnt have any value. How can make it run?

enter image description here

dasfdsa
  • 6,098
  • 5
  • 47
  • 83

0 Answers0