JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.1
[ckeditor.git] / _source / core / dom / comment.js
1 /*\r
2 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license\r
4 */\r
5 \r
6 /**\r
7  * @fileOverview Defines the {@link CKEDITOR.dom.comment} class, which represents\r
8  *              a DOM comment node.\r
9  */\r
10 \r
11 CKEDITOR.dom.comment = CKEDITOR.tools.createClass(\r
12 {\r
13         base : CKEDITOR.dom.node,\r
14 \r
15         $ : function( text, ownerDocument )\r
16         {\r
17                 if ( typeof text == 'string' )\r
18                         text = ( ownerDocument ? ownerDocument.$ : document ).createComment( text );\r
19 \r
20                 this.base( text );\r
21         },\r
22 \r
23         proto :\r
24         {\r
25                 type : CKEDITOR.NODE_COMMENT,\r
26 \r
27                 getOuterHtml : function()\r
28                 {\r
29                         return '<!--' + this.$.nodeValue + '-->';\r
30                 }\r
31         }\r
32 });\r