Debian Codegraph @

vendor/wikimedia/idle-dom/src/Event.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 * Event
10 *
11 * @see https://dom.spec.whatwg.org/#interface-event
12 *
13 * @property string $type
14 * @property EventTarget|null $target
15 * @property EventTarget|null $srcElement
16 * @property EventTarget|null $currentTarget
17 * @property int $eventPhase
18 * @property bool $cancelBubble
19 * @property bool $bubbles
20 * @property bool $cancelable
21 * @property bool $returnValue
22 * @property bool $defaultPrevented
23 * @property bool $composed
24 * @property bool $isTrusted
25 * @property float $timeStamp
26 * @phan-forbid-undeclared-magic-properties
27 */
28 interface Event {
29
30 /**
31 * @return string
32 */
33 public function getType(): string;
34
35 /**
36 * @return EventTarget|null
37 */
38 public function getTarget();
39
40 /**
41 * @return EventTarget|null
42 */
43 public function getSrcElement();
44
45 /**
46 * @return EventTarget|null
47 */
48 public function getCurrentTarget();
49
50 /**
51 * @return list<EventTarget>
52 */
53 public function composedPath(): array;
54
55 /** @var int */
56 public const NONE = 0;
57
58 /** @var int */
59 public const CAPTURING_PHASE = 1;
60
61 /** @var int */
62 public const AT_TARGET = 2;
63
64 /** @var int */
65 public const BUBBLING_PHASE = 3;
66
67 /**
68 * @return int
69 */
70 public function getEventPhase(): int;
71
72 /**
73 * @return void
74 */
75 public function stopPropagation(): void;
76
77 /**
78 * @return bool
79 */
80 public function getCancelBubble(): bool;
81
82 /**
83 * @param bool $val
84 */
85 public function setCancelBubble( bool $val ): void;
86
87 /**
88 * @return void
89 */
90 public function stopImmediatePropagation(): void;
91
92 /**
93 * @return bool
94 */
95 public function getBubbles(): bool;
96
97 /**
98 * @return bool
99 */
100 public function getCancelable(): bool;
101
102 /**
103 * @return bool
104 */
105 public function getReturnValue(): bool;
106
107 /**
108 * @param bool $val
109 */
110 public function setReturnValue( bool $val ): void;
111
112 /**
113 * @return void
114 */
115 public function preventDefault(): void;
116
117 /**
118 * @return bool
119 */
120 public function getDefaultPrevented(): bool;
121
122 /**
123 * @return bool
124 */
125 public function getComposed(): bool;
126
127 /**
128 * @return bool
129 */
130 public function getIsTrusted(): bool;
131
132 /**
133 * @return float
134 */
135 public function getTimeStamp(): float;
136
137 /**
138 * @param string $type
139 * @param bool $bubbles
140 * @param bool $cancelable
141 * @return void
142 */
143 public function initEvent( string $type, bool $bubbles = false, bool $cancelable = false ): void;
144
145 }