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