Closed vwkd closed 1 year ago
Please add support to stringify a parsed DOM back into HTML.
This is useful to manipulate or rewrite HTML.
To serialize the document to a string you can use the .outerHTML property:
.outerHTML
const htmlString = "<!DOCTYPE html>\n" + doc.documentElement.outerHTML;
Too easy, missed that. Sorry!
Please add support to stringify a parsed DOM back into HTML.
This is useful to manipulate or rewrite HTML.