2 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3 For licensing, see LICENSE.html or http://ckeditor.com/license
7 * A lightweight representation of an HTML comment.
11 CKEDITOR.htmlParser.comment = function( value )
27 CKEDITOR.htmlParser.comment.prototype =
30 * The node type. This is a constant value set to {@link CKEDITOR.NODE_COMMENT}.
34 type : CKEDITOR.NODE_COMMENT,
37 * Writes the HTML representation of this comment to a CKEDITOR.htmlWriter.
38 * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML.
41 writeHtml : function( writer, filter )
43 var comment = this.value;
47 if ( !( comment = filter.onComment( comment, this ) ) )
50 if ( typeof comment != 'string' )
52 comment.parent = this.parent;
53 comment.writeHtml( writer, filter );
58 writer.comment( comment );