dom-comment.js 426 B

12345678910111213141516171819
  1. module.exports = Comment
  2. function Comment(data, owner) {
  3. if (!(this instanceof Comment)) {
  4. return new Comment(data, owner)
  5. }
  6. this.data = data
  7. this.nodeValue = data
  8. this.length = data.length
  9. this.ownerDocument = owner || null
  10. }
  11. Comment.prototype.nodeType = 8
  12. Comment.prototype.nodeName = "#comment"
  13. Comment.prototype.toString = function _Comment_toString() {
  14. return "[object Comment]"
  15. }