| 1 | /*global Autolinker */ |
| 2 | /** |
| 3 | * @class Autolinker.htmlParser.CommentNode |
| 4 | * @extends Autolinker.htmlParser.HtmlNode |
| 5 | * |
| 6 | * Represents an HTML comment node that has been parsed by the |
| 7 | * {@link Autolinker.htmlParser.HtmlParser}. |
| 8 | * |
| 9 | * See this class's superclass ({@link Autolinker.htmlParser.HtmlNode}) for more |
| 10 | * details. |
| 11 | */ |
| 12 | Autolinker.htmlParser.CommentNode = Autolinker.Util.extend( Autolinker.htmlParser.HtmlNode, { |
| 13 | |
| 14 | /** |
| 15 | * @cfg {String} comment (required) |
| 16 | * |
| 17 | * The text inside the comment tag. This text is stripped of any leading or |
| 18 | * trailing whitespace. |
| 19 | */ |
| 20 | comment : '', |
| 21 | |
| 22 | |
| 23 | /** |
| 24 | * Returns a string name for the type of node that this class represents. |
| 25 | * |
| 26 | * @return {String} |
| 27 | */ |
| 28 | getType : function() { |
| 29 | return 'comment'; |
| 30 | }, |
| 31 | |
| 32 | |
| 33 | /** |
| 34 | * Returns the comment inside the comment tag. |
| 35 | * |
| 36 | * @return {String} |
| 37 | */ |
| 38 | getComment : function() { |
| 39 | return this.comment; |
| 40 | } |
| 41 | |
| 42 | } ); |