Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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>";
Source by github.com #
 
PREVIOUS NEXT
Tagged: #JSDOM #returns #dom #string
ADD COMMENT
Topic
Name
6+5 =