• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Interface: Element
2
3### Properties
4
5* [attribs](#attribs)
6* [childNodes](#childnodes)
7* [children](#children)
8* [firstChild](#firstchild)
9* [lastChild](#lastchild)
10* [name](#name)
11* [namespace](#namespace)
12* [next](#next)
13* [nextSibling](#nextsibling)
14* [nodeType](#nodetype)
15* [parent](#parent)
16* [parentNode](#parentnode)
17* [prev](#prev)
18* [previousSibling](#previoussibling)
19* [sourceCodeLocation](#sourcecodelocation)
20* [tagName](#tagname)
21* [type](#type)
22* [x-attribsNamespace](#x_attribsnamespace)
23* [x-attribsPrefix](#x_attribsprefix)
24
25---
26
27## Properties
28
29<a id="attribs"></a>
30
31###  attribs
32
33**● attribs**: *`object`*
34
35Element attributes.
36
37#### Type declaration
38
39[name: `string`]: `string`
40
41___
42<a id="childnodes"></a>
43
44###  childNodes
45
46**● childNodes**: *Node[]*
47
48Same as [children](#children). [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
49
50___
51<a id="children"></a>
52
53###  children
54
55**● children**: *Node[]*
56
57Child nodes.
58
59___
60<a id="firstchild"></a>
61
62###  firstChild
63
64**● firstChild**: *Node*
65
66First child of the node.
67
68___
69<a id="lastchild"></a>
70
71###  lastChild
72
73**● lastChild**: *Node*
74
75Last child of the node.
76
77___
78<a id="name"></a>
79
80###  name
81
82**● name**: *`string`*
83
84The name of the node. Equals to element [tagName](#tagname).
85
86___
87<a id="namespace"></a>
88
89###  namespace
90
91**● namespace**: *`string`*
92
93Element namespace.
94
95___
96<a id="next"></a>
97
98###  next
99
100**● next**: *Node*
101
102Next sibling.
103
104___
105<a id="nextsibling"></a>
106
107###  nextSibling
108
109**● nextSibling**: *Node*
110
111Same as [next](#next). [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
112
113___
114<a id="nodetype"></a>
115
116###  nodeType
117
118**● nodeType**: *`number`*
119
120[DOM spec](https://dom.spec.whatwg.org/#dom-node-nodetype)-compatible node [type](#type).
121
122___
123<a id="parent"></a>
124
125###  parent
126
127**● parent**: *Node*
128
129Parent node.
130
131___
132<a id="parentnode"></a>
133
134###  parentNode
135
136**● parentNode**: *Node*
137
138Same as [parent](#parent). [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
139
140___
141<a id="prev"></a>
142
143###  prev
144
145**● prev**: *Node*
146
147Previous sibling.
148
149___
150<a id="previoussibling"></a>
151
152###  previousSibling
153
154**● previousSibling**: *Node*
155
156Same as [prev](#prev). [DOM spec](https://dom.spec.whatwg.org)-compatible alias.
157
158___
159<a id="sourcecodelocation"></a>
160
161### `<Optional>` sourceCodeLocation
162
163**● sourceCodeLocation**: *[ElementLocation](../../parse5/docs/element-location.md)*
164
165Element source code location info. Available if location info is enabled via [ParserOptions](../../parse5/docs/parser-options.md).
166
167___
168<a id="tagname"></a>
169
170###  tagName
171
172**● tagName**: *`string`*
173
174Element tag name.
175
176___
177<a id="type"></a>
178
179###  type
180
181**● type**: *`string`*
182
183The type of the node. E.g. [Document](document.md) will have `type` equal to 'root'`.
184
185___
186<a id="x_attribsnamespace"></a>
187
188###  x-attribsNamespace
189
190**● x-attribsNamespace**: *`object`*
191
192Element attribute namespaces.
193
194#### Type declaration
195
196[name: `string`]: `string`
197
198___
199<a id="x_attribsprefix"></a>
200
201###  x-attribsPrefix
202
203**● x-attribsPrefix**: *`object`*
204
205Element attribute namespace-related prefixes.
206
207#### Type declaration
208
209[name: `string`]: `string`
210
211___
212
213