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
  • 7,102
  • 8
  • 51
  • 93

0 Answers0