Debian Codegraph @

vendor/wikimedia/idle-dom/src/Document.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 * Document
10 *
11 * @see https://dom.spec.whatwg.org/#interface-document
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 StyleSheetList $styleSheets
28 * @property EventHandlerNonNull|callable|null $onload
29 * @property HTMLCollection $children
30 * @property Element|null $firstElementChild
31 * @property Element|null $lastElementChild
32 * @property int $childElementCount
33 * @property DOMImplementation $implementation
34 * @property string $URL
35 * @property string $documentURI
36 * @property string $compatMode
37 * @property string $characterSet
38 * @property string $charset
39 * @property string $inputEncoding
40 * @property string $contentType
41 * @property DocumentType|null $doctype
42 * @property Element|null $documentElement
43 * @property Location|null $location
44 * @property string $referrer
45 * @property string $cookie
46 * @property string $lastModified
47 * @property string $title
48 * @property string $dir
49 * @property HTMLElement|null $body
50 * @property HTMLHeadElement|null $head
51 * @property HTMLCollection $images
52 * @property HTMLCollection $embeds
53 * @property HTMLCollection $plugins
54 * @property HTMLCollection $links
55 * @property HTMLCollection $forms
56 * @property HTMLCollection $scripts
57 * @property HTMLScriptElement|null $currentScript
58 * @property EventHandlerNonNull|callable|null $onreadystatechange
59 * @property HTMLCollection $anchors
60 * @property HTMLCollection $applets
61 * @property bool $hidden
62 * @property string $visibilityState
63 * @property EventHandlerNonNull|callable|null $onvisibilitychange
64 * @property string $encoding
65 * @property bool $preserveWhiteSpace
66 * @property bool $formatOutput
67 * @property bool $validateOnParse
68 * @property bool $strictErrorChecking
69 * @phan-forbid-undeclared-magic-properties
70 */
71 interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShadowRoot, GlobalEventHandlers, NonElementParentNode, ParentNode, XPathEvaluatorBase {
72 // Direct parent: Node
73
74 /**
75 * @return DOMImplementation
76 */
77 public function getImplementation();
78
79 /**
80 * @return string
81 */
82 public function getURL(): string;
83
84 /**
85 * @return string
86 */
87 public function getDocumentURI(): string;
88
89 /**
90 * @return string
91 */
92 public function getCompatMode(): string;
93
94 /**
95 * @return string
96 */
97 public function getCharacterSet(): string;
98
99 /**
100 * @return string
101 */
102 public function getCharset(): string;
103
104 /**
105 * @return string
106 */
107 public function getInputEncoding(): string;
108
109 /**
110 * @return string
111 */
112 public function getContentType(): string;
113
114 /**
115 * @return DocumentType|null
116 */
117 public function getDoctype();
118
119 /**
120 * @return Element|null
121 */
122 public function getDocumentElement();
123
124 /**
125 * @param string $qualifiedName
126 * @return HTMLCollection
127 */
128 public function getElementsByTagName( string $qualifiedName );
129
130 /**
131 * @param ?string $namespace
132 * @param string $localName
133 * @return HTMLCollection
134 */
135 public function getElementsByTagNameNS( ?string $namespace, string $localName );
136
137 /**
138 * @param string $classNames
139 * @return HTMLCollection
140 */
141 public function getElementsByClassName( string $classNames );
142
143 /**
144 * @param string $localName
145 * @param string|ElementCreationOptions|associative-array|null $options
146 * @return Element
147 */
148 public function createElement( string $localName, /* ?mixed */ $options = null );
149
150 /**
151 * @param ?string $namespace
152 * @param string $qualifiedName
153 * @param string|ElementCreationOptions|associative-array|null $options
154 * @return Element
155 */
156 public function createElementNS( ?string $namespace, string $qualifiedName, /* ?mixed */ $options = null );
157
158 /**
159 * @return DocumentFragment
160 */
161 public function createDocumentFragment();
162
163 /**
164 * @param string $data
165 * @return Text
166 */
167 public function createTextNode( string $data );
168
169 /**
170 * @param string $data
171 * @return CDATASection
172 */
173 public function createCDATASection( string $data );
174
175 /**
176 * @param string $data
177 * @return Comment
178 */
179 public function createComment( string $data );
180
181 /**
182 * @param string $target
183 * @param string $data
184 * @return ProcessingInstruction
185 */
186 public function createProcessingInstruction( string $target, string $data );
187
188 /**
189 * @param Node $node
190 * @param bool $deep
191 * @return Node
192 */
193 public function importNode( /* Node */ $node, bool $deep = false );
194
195 /**
196 * @param Node $node
197 * @return Node
198 */
199 public function adoptNode( /* Node */ $node );
200
201 /**
202 * @param string $localName
203 * @return Attr
204 */
205 public function createAttribute( string $localName );
206
207 /**
208 * @param ?string $namespace
209 * @param string $qualifiedName
210 * @return Attr
211 */
212 public function createAttributeNS( ?string $namespace, string $qualifiedName );
213
214 /**
215 * @param string $interface
216 * @return Event
217 */
218 public function createEvent( string $interface );
219
220 /**
221 * @return Range
222 */
223 public function createRange();
224
225 /**
226 * @param Node $root
227 * @param int $whatToShow
228 * @param NodeFilter|callable|null $filter
229 * @return NodeIterator
230 */
231 public function createNodeIterator( /* Node */ $root, int $whatToShow = -1, /* ?mixed */ $filter = null );
232
233 /**
234 * @param Node $root
235 * @param int $whatToShow
236 * @param NodeFilter|callable|null $filter
237 * @return TreeWalker
238 */
239 public function createTreeWalker( /* Node */ $root, int $whatToShow = -1, /* ?mixed */ $filter = null );
240
241 /**
242 * @return Location|null
243 */
244 public function getLocation();
245
246 /**
247 * @param string $val
248 */
249 public function setLocation( string $val ): void;
250
251 /**
252 * @return string
253 */
254 public function getReferrer(): string;
255
256 /**
257 * @return string
258 */
259 public function getCookie(): string;
260
261 /**
262 * @param string $val
263 */
264 public function setCookie( string $val ): void;
265
266 /**
267 * @return string
268 */
269 public function getLastModified(): string;
270
271 /**
272 * @return string
273 */
274 public function getTitle(): string;
275
276 /**
277 * @param string $val
278 */
279 public function setTitle( string $val ): void;
280
281 /**
282 * @return string
283 */
284 public function getDir(): string;
285
286 /**
287 * @param string $val
288 */
289 public function setDir( string $val ): void;
290
291 /**
292 * @return HTMLElement|null
293 */
294 public function getBody();
295
296 /**
297 * @param HTMLElement|null $val
298 */
299 public function setBody( /* ?HTMLElement */ $val ): void;
300
301 /**
302 * @return HTMLHeadElement|null
303 */
304 public function getHead();
305
306 /**
307 * @return HTMLCollection
308 */
309 public function getImages();
310
311 /**
312 * @return HTMLCollection
313 */
314 public function getEmbeds();
315
316 /**
317 * @return HTMLCollection
318 */
319 public function getPlugins();
320
321 /**
322 * @return HTMLCollection
323 */
324 public function getLinks();
325
326 /**
327 * @return HTMLCollection
328 */
329 public function getForms();
330
331 /**
332 * @return HTMLCollection
333 */
334 public function getScripts();
335
336 /**
337 * @param string $elementName
338 * @return NodeList
339 */
340 public function getElementsByName( string $elementName );
341
342 /**
343 * @return HTMLScriptElement|null
344 */
345 public function getCurrentScript();
346
347 /**
348 * @param string $type
349 * @param string $replace
350 * @return \Wikimedia\IDLeDOM\Document
351 */
352 public function open( string $type = 'text/html', string $replace = '' );
353
354 /**
355 * @return void
356 */
357 public function close(): void;
358
359 /**
360 * @param string ...$text
361 * @return void
362 */
363 public function write( string ...$text ): void;
364
365 /**
366 * @param string ...$text
367 * @return void
368 */
369 public function writeln( string ...$text ): void;
370
371 /**
372 * @return bool
373 */
374 public function hasFocus(): bool;
375
376 /**
377 * @return EventHandlerNonNull|callable|null
378 */
379 public function getOnreadystatechange();
380
381 /**
382 * @param EventHandlerNonNull|callable|null $val
383 */
384 public function setOnreadystatechange( /* ?mixed */ $val ): void;
385
386 /**
387 * @return HTMLCollection
388 */
389 public function getAnchors();
390
391 /**
392 * @return HTMLCollection
393 */
394 public function getApplets();
395
396 /**
397 * @return void
398 */
399 public function clear(): void;
400
401 /**
402 * @return void
403 */
404 public function captureEvents(): void;
405
406 /**
407 * @return void
408 */
409 public function releaseEvents(): void;
410
411 /**
412 * @return bool
413 */
414 public function getHidden(): bool;
415
416 /**
417 * @return string
418 */
419 public function getVisibilityState(): /* VisibilityState */ string;
420
421 /**
422 * @return EventHandlerNonNull|callable|null
423 */
424 public function getOnvisibilitychange();
425
426 /**
427 * @param EventHandlerNonNull|callable|null $val
428 */
429 public function setOnvisibilitychange( /* ?mixed */ $val ): void;
430
431 /**
432 * @return string
433 */
434 public function getEncoding(): string;
435
436 /**
437 * @param string $val
438 */
439 public function setEncoding( string $val ): void;
440
441 /**
442 * @return bool
443 */
444 public function getPreserveWhiteSpace(): bool;
445
446 /**
447 * @param bool $val
448 */
449 public function setPreserveWhiteSpace( bool $val ): void;
450
451 /**
452 * @return bool
453 */
454 public function getFormatOutput(): bool;
455
456 /**
457 * @param bool $val
458 */
459 public function setFormatOutput( bool $val ): void;
460
461 /**
462 * @return bool
463 */
464 public function getValidateOnParse(): bool;
465
466 /**
467 * @param bool $val
468 */
469 public function setValidateOnParse( bool $val ): void;
470
471 /**
472 * @return bool
473 */
474 public function getStrictErrorChecking(): bool;
475
476 /**
477 * @param bool $val
478 */
479 public function setStrictErrorChecking( bool $val ): void;
480
481 /**
482 * @param string $source
483 * @param int $options
484 * @return bool
485 */
486 public function loadHTML( string $source, int $options = 0 ): bool;
487
488 /**
489 * @param string $source
490 * @param int $options
491 * @return bool
492 */
493 public function loadXML( string $source, int $options = 0 ): bool;
494
495 /**
496 * @param Node|null $node
497 * @return string|bool
498 */
499 public function saveHTML( /* ?Node */ $node = null );
500
501 /**
502 * @param Node|null $node
503 * @param int $options
504 * @return string|bool
505 */
506 public function saveXML( /* ?Node */ $node = null, int $options = 0 );
507
508 }