marko/runtime/vdom/VComment.js
2017-03-28 11:02:12 -06:00

24 lines
454 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;