diff --git a/lib/document.js b/lib/document.js index 86536ca..b545545 100644 --- a/lib/document.js +++ b/lib/document.js @@ -67,15 +67,6 @@ class Document extends Node { return new Node(body[0]) } - - /** - * Returns the stringified version of this document - * @returns {string} - */ - toHtml() { - - return domUtils.getOuterHTML(this._element) - } } module.exports = Document \ No newline at end of file diff --git a/lib/node.js b/lib/node.js index fa7491d..506b647 100644 --- a/lib/node.js +++ b/lib/node.js @@ -223,6 +223,15 @@ class Node { return this } + + /** + * Returns the stringified version of this document + * @returns {string} + */ + toHtml() { + + return domUtils.getOuterHTML(this._element) + } } module.exports = Node \ No newline at end of file