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?
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?