mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
23 lines
451 B
JavaScript
23 lines
451 B
JavaScript
var Node = require('./Node');
|
|
var inherit = require('raptor-util/inherit');
|
|
|
|
function Comment(value) {
|
|
Node.call(this, -1 /* no children */);
|
|
this.nodeValue = value;
|
|
}
|
|
|
|
Comment.prototype = {
|
|
nodeType: 8,
|
|
|
|
actualize: function(document) {
|
|
return document.createComment(this.nodeValue);
|
|
},
|
|
|
|
$__cloneNode: function() {
|
|
return new Comment(this.nodeValue);
|
|
}
|
|
};
|
|
|
|
inherit(Comment, Node);
|
|
|
|
module.exports = Comment; |