Serializes an AST element node to an HTML string, including the element node.
Node to serialize.
Optional
Serialization options.
const parse5 = require('parse5');const document = parse5.parseFragment('<div>Hello, <b>world</b>!</div>');// Serializes the <div> element.const str = parse5.serializeOuter(document.childNodes[0]);console.log(str); //> '<div>Hello, <b>world</b>!</div>' Copy
const parse5 = require('parse5');const document = parse5.parseFragment('<div>Hello, <b>world</b>!</div>');// Serializes the <div> element.const str = parse5.serializeOuter(document.childNodes[0]);console.log(str); //> '<div>Hello, <b>world</b>!</div>'
Serializes an AST element node to an HTML string, including the element node.