Debian Codegraph @

vendor/wikimedia/idle-dom/src/Element.php

raw
1 <?php
2
3 // AUTOMATICALLY GENERATED. DO NOT EDIT.
4 // Use `composer build` to regenerate.
5
6 namespace Wikimedia\IDLeDOM;
7
8 /**
9 * Element
10 *
11 * @see https://dom.spec.whatwg.org/#interface-element
12 *
13 * @property int $nodeType
14 * @property string $nodeName
15 * @property string $baseURI
16 * @property bool $isConnected
17 * @property Document|null $ownerDocument
18 * @property Node|null $parentNode
19 * @property Element|null $parentElement
20 * @property NodeList $childNodes
21 * @property Node|null $firstChild
22 * @property Node|null $lastChild
23 * @property Node|null $previousSibling
24 * @property Node|null $nextSibling
25 * @property ?string $nodeValue
26 * @property ?string $textContent
27 * @property string $innerHTML
28 * @property Element|null $previousElementSibling
29 * @property Element|null $nextElementSibling
30 * @property HTMLCollection $children
31 * @property Element|null $firstElementChild
32 * @property Element|null $lastElementChild
33 * @property int $childElementCount
34 * @property HTMLSlotElement|null $assignedSlot
35 * @property ?string $namespaceURI
36 * @property ?string $prefix
37 * @property string $localName
38 * @property string $tagName
39 * @property string $id
40 * @property string $className
41 * @property DOMTokenList $classList
42 * @property string $slot
43 * @property NamedNodeMap $attributes
44 * @property ShadowRoot|null $shadowRoot
45 * @property string $outerHTML
46 * @phan-forbid-undeclared-magic-properties
47 */
48 interface Element extends Node, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slottable {
49 // Direct parent: Node
50
51 /**
52 * @return ?string
53 */
54 public function getNamespaceURI(): ?string;
55
56 /**
57 * @return ?string
58 */
59 public function getPrefix(): ?string;
60
61 /**
62 * @return string
63 */
64 public function getLocalName(): string;
65
66 /**
67 * @return string
68 */
69 public function getTagName(): string;
70
71 /**
72 * @return string
73 */
74 public function getId(): string;
75
76 /**
77 * @param string $val
78 */
79 public function setId( string $val ): void;
80
81 /**
82 * @return string
83 */
84 public function getClassName(): string;
85
86 /**
87 * @param string $val
88 */
89 public function setClassName( string $val ): void;
90
91 /**
92 * @return DOMTokenList
93 */
94 public function getClassList();
95
96 /**
97 * @param string $val
98 */
99 public function setClassList( string $val ): void;
100
101 /**
102 * @return string
103 */
104 public function getSlot(): string;
105
106 /**
107 * @param string $val
108 */
109 public function setSlot( string $val ): void;
110
111 /**
112 * @return bool
113 */
114 public function hasAttributes(): bool;
115
116 /**
117 * @return NamedNodeMap
118 */
119 public function getAttributes();
120
121 /**
122 * @return list<string>
123 */
124 public function getAttributeNames(): array;
125
126 /**
127 * @param string $qualifiedName
128 * @return ?string
129 */
130 public function getAttribute( string $qualifiedName ): ?string;
131
132 /**
133 * @param ?string $namespace
134 * @param string $localName
135 * @return ?string
136 */
137 public function getAttributeNS( ?string $namespace, string $localName ): ?string;
138
139 /**
140 * @param string $qualifiedName
141 * @param string $value
142 * @return void
143 */
144 public function setAttribute( string $qualifiedName, string $value ): void;
145
146 /**
147 * @param ?string $namespace
148 * @param string $qualifiedName
149 * @param string $value
150 * @return void
151 */
152 public function setAttributeNS( ?string $namespace, string $qualifiedName, string $value ): void;
153
154 /**
155 * @param string $qualifiedName
156 * @return void
157 */
158 public function removeAttribute( string $qualifiedName ): void;
159
160 /**
161 * @param ?string $namespace
162 * @param string $localName
163 * @return void
164 */
165 public function removeAttributeNS( ?string $namespace, string $localName ): void;
166
167 /**
168 * @param string $qualifiedName
169 * @param ?bool $force
170 * @return bool
171 */
172 public function toggleAttribute( string $qualifiedName, ?bool $force = null ): bool;
173
174 /**
175 * @param string $qualifiedName
176 * @return bool
177 */
178 public function hasAttribute( string $qualifiedName ): bool;
179
180 /**
181 * @param ?string $namespace
182 * @param string $localName
183 * @return bool
184 */
185 public function hasAttributeNS( ?string $namespace, string $localName ): bool;
186
187 /**
188 * @param string $qualifiedName
189 * @return Attr|null
190 */
191 public function getAttributeNode( string $qualifiedName );
192
193 /**
194 * @param ?string $namespace
195 * @param string $localName
196 * @return Attr|null
197 */
198 public function getAttributeNodeNS( ?string $namespace, string $localName );
199
200 /**
201 * @param Attr $attr
202 * @return Attr|null
203 */
204 public function setAttributeNode( /* Attr */ $attr );
205
206 /**
207 * @param Attr $attr
208 * @return Attr|null
209 */
210 public function setAttributeNodeNS( /* Attr */ $attr );
211
212 /**
213 * @param Attr $attr
214 * @return Attr
215 */
216 public function removeAttributeNode( /* Attr */ $attr );
217
218 /**
219 * @param ShadowRootInit|associative-array $init
220 * @return ShadowRoot
221 */
222 public function attachShadow( /* mixed */ $init );
223
224 /**
225 * @return ShadowRoot|null
226 */
227 public function getShadowRoot();
228
229 /**
230 * @param string $selectors
231 * @return \Wikimedia\IDLeDOM\Element|null
232 */
233 public function closest( string $selectors );
234
235 /**
236 * @param string $selectors
237 * @return bool
238 */
239 public function matches( string $selectors ): bool;
240
241 /**
242 * @param string $selectors
243 * @return bool
244 */
245 public function webkitMatchesSelector( string $selectors ): bool;
246
247 /**
248 * @param string $qualifiedName
249 * @return HTMLCollection
250 */
251 public function getElementsByTagName( string $qualifiedName );
252
253 /**
254 * @param ?string $namespace
255 * @param string $localName
256 * @return HTMLCollection
257 */
258 public function getElementsByTagNameNS( ?string $namespace, string $localName );
259
260 /**
261 * @param string $classNames
262 * @return HTMLCollection
263 */
264 public function getElementsByClassName( string $classNames );
265
266 /**
267 * @param string $where
268 * @param \Wikimedia\IDLeDOM\Element $element
269 * @return \Wikimedia\IDLeDOM\Element|null
270 */
271 public function insertAdjacentElement( string $where, /* \Wikimedia\IDLeDOM\Element */ $element );
272
273 /**
274 * @param string $where
275 * @param string $data
276 * @return void
277 */
278 public function insertAdjacentText( string $where, string $data ): void;
279
280 /**
281 * @return string
282 */
283 public function getOuterHTML(): string;
284
285 /**
286 * @param ?string $val
287 */
288 public function setOuterHTML( ?string $val ): void;
289
290 /**
291 * @param string $position
292 * @param string $text
293 * @return void
294 */
295 public function insertAdjacentHTML( string $position, string $text ): void;
296
297 /**
298 * @param string $qualifiedName
299 * @param bool $isId
300 * @return void
301 */
302 public function setIdAttribute( string $qualifiedName, bool $isId ): void;
303
304 /**
305 * @param Attr $attr
306 * @param bool $isId
307 * @return void
308 */
309 public function setIdAttributeNode( /* Attr */ $attr, bool $isId ): void;
310
311 /**
312 * @param string $namespace
313 * @param string $qualifiedName
314 * @param bool $isId
315 * @return void
316 */
317 public function setIdAttributeNS( string $namespace, string $qualifiedName, bool $isId ): void;
318
319 }