| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1× 1× 1× 1× 936× 692× 244× 3× | import { document } from '../seed/core'
export function VComment(text) {
this.nodeName = '#comment'
this.nodeValue = text
}
VComment.prototype = {
constructor: VComment,
toDOM: function() {
if (this.dom)
return this.dom
return this.dom = document.createComment(this.nodeValue)
},
toHTML: function() {
return '<!--' + this.nodeValue + '-->'
}
} |