@@ -78,6 +78,9 @@ export class Node {
78
78
}
79
79
}
80
80
81
+ /**
82
+ * A node that contains some data.
83
+ */
81
84
export class DataNode extends Node {
82
85
/**
83
86
* @param type The type of the node
@@ -99,18 +102,27 @@ export class DataNode extends Node {
99
102
}
100
103
}
101
104
105
+ /**
106
+ * Text within the document.
107
+ */
102
108
export class Text extends DataNode {
103
109
constructor ( data : string ) {
104
110
super ( ElementType . Text , data ) ;
105
111
}
106
112
}
107
113
114
+ /**
115
+ * Comments within the document.
116
+ */
108
117
export class Comment extends DataNode {
109
118
constructor ( data : string ) {
110
119
super ( ElementType . Comment , data ) ;
111
120
}
112
121
}
113
122
123
+ /**
124
+ * Processing instructions, including doc types.
125
+ */
114
126
export class ProcessingInstruction extends DataNode {
115
127
constructor ( public name : string , data : string ) {
116
128
super ( ElementType . Directive , data ) ;
@@ -161,6 +173,9 @@ export class NodeWithChildren extends Node {
161
173
}
162
174
}
163
175
176
+ /**
177
+ * The root node of the document.
178
+ */
164
179
export class Document extends NodeWithChildren {
165
180
constructor ( children : Node [ ] ) {
166
181
super ( ElementType . Root , children ) ;
@@ -169,12 +184,19 @@ export class Document extends NodeWithChildren {
169
184
"x-mode" ?: "no-quirks" | "quirks" | "limited-quirks" ;
170
185
}
171
186
187
+ /**
188
+ * The description of an individual attribute.
189
+ */
172
190
interface Attribute {
173
191
name : string ;
174
192
value : string ;
175
193
namespace ?: string ;
176
194
prefix ?: string ;
177
195
}
196
+
197
+ /**
198
+ * An element within the DOM.
199
+ */
178
200
export class Element extends NodeWithChildren {
179
201
/**
180
202
* @param name Name of the tag, eg. `div`, `span`.
0 commit comments