|
@@ -4,21 +4,21 @@ 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. |
|
|
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 |
|
|
|
|
|
|
|
|
## Install |
|
|
|
|
|
|
|
|
npm install document-outerhtml |
|
|
npm install document-outerhtml |
|
|
|
|
|
|
|
|
# Usage |
|
|
|
|
|
|
|
|
## Usage |
|
|
|
|
|
|
|
|
import documentOuterHTML from 'document-outerhtml' |
|
|
import documentOuterHTML from 'document-outerhtml' |
|
|
|
|
|
|
|
|
const html = documentOuterHTML(document) |
|
|
const html = documentOuterHTML(document) |
|
|
|
|
|
|
|
|
# Licence |
|
|
|
|
|
|
|
|
## Licence |
|
|
|
|
|
|
|
|
[CC0](https://creativecommons.org/publicdomain/zero/1.0/); do whatever you want with this code. |
|
|
[CC0](https://creativecommons.org/publicdomain/zero/1.0/); do whatever you want with this code. |
|
|
|
|
|
|
|
|
# See also |
|
|
|
|
|
|
|
|
## See also |
|
|
|
|
|
|
|
|
- [XMLSerializer.serializeToString][]; does nearly the same thing, except it creates XML. |
|
|
- [XMLSerializer.serializeToString][]; does nearly the same thing, except it creates XML. |
|
|
|
|
|
|
|
|