Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
feat(node.js): allow stringifying of node instances
Browse files Browse the repository at this point in the history
  • Loading branch information
stfsy committed Aug 6, 2016
1 parent fd0c52f commit 783a18b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 0 additions & 9 deletions lib/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 9 additions & 0 deletions lib/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 783a18b

Please sign in to comment.