I'm working on a project where I need to display parsed HTML content within an element. However, before displaying it, I need to make some changes to the HTML using the `replace` method. But unfortunately, I encountered a TypeError: (intermediate value).parseFromString(...).replace is not a function issue. Can anyone provide assistance in resolving this problem? Thank you.
const parsedHTML = new DOMParser().parseFromString(html, "text/html");
const renderHtml = parsedHTML.replace('aria-expanded="false"', 'aria-expanded="true"');
console.log(renderHtml);