Comment
public final class Comment: TextNode
This represents the content of a comment, i.e., all the characters between the
starting <!--
and ending -->
.
-
The
nodeType
of aComment
is.comment
.Declaration
Swift
public static let nodeType: NodeType = .comment
-
The
nodeName
of aComment
is#comment
.Declaration
Swift
public final let nodeName: String = "#comment"
-
The
attributes
dictionary of aComment
isnil
.Declaration
Swift
public final let attributes: [String : String]? = nil
-
Creates a new
Comment
node.Declaration
Swift
public init(text: String)
Parameters
text
The string contents of this comment.
-
A comment node calls
visit(self)
on the visitor.Declaration
Swift
public func accept(_ visitor: Visitor)