Answers for "JSDOM - serialize() // returns dom as string"

0

JSDOM - serialize() // returns dom as string

const dom = new JSDOM(`<!DOCTYPE html>hello`);

dom.serialize() === "<!DOCTYPE html><html><head></head><body>hello</body></html>";

// Contrast with:
dom.window.document.documentElement.outerHTML === "<html><head></head><body>hello</body></html>";
Posted by: Guest on May-14-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language