0.1.4 • Published 4 years ago

document-outerhtml v0.1.4

Weekly downloads
12
License
CC0-1.0
Repository
-
Last release
4 years ago

document-outerhtml

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.

Install

npm install "git+https://code.treora.com/gerben/document-outerhtml#latest"

or

npm install document-outerhtml@latest

..or equivalent

Usage

import documentOuterHTML from 'document-outerhtml'

const html = documentOuterHTML(document)

Licence

CC0; do whatever you want with this code.

See also

0.1.4

4 years ago

0.1.2

4 years ago

0.1.3

4 years ago

0.1.1

5 years ago

0.1.0

6 years ago