marko/runtime/vdom/VComment.js
2017-01-20 13:40:21 -07:00

24 lines
448 B
JavaScript

var VNode = require('./VNode');
var inherit = require('raptor-util/inherit');
function VComment(value) {
this.$__VNode(-1 /* no children */);
this.nodeValue = value;
}
VComment.prototype = {
nodeType: 8,
actualize: function(doc) {
return doc.createComment(this.nodeValue);
},
$__cloneNode: function() {
return new VComment(this.nodeValue);
}
};
inherit(VComment, VNode);
module.exports = VComment;