src | 6 years ago |
test | 6 years ago |
.gitignore | 6 years ago |
Readme.md | 6 years ago |
package.json | 6 years ago |
Like Element.outerHTML, but for the whole Document.
This means it returns a string containing the <html>.....</html>
with all the content between, plus the <!DOCTYPE ....>
declaration (if present), and any comments and stray elements or text nodes.
npm install document-outerhtml
import documentOuterHTML from 'document-outerhtml'
const html = documentOuterHTML(document)
CC0; do whatever you want with this code.