1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = EventTarget , typescript_type = "EventTarget")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `EventTarget` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `EventTarget`*"]
14 pub type EventTarget;
15 #[wasm_bindgen(catch, constructor, js_class = "EventTarget")]
16 #[doc = "The `new EventTarget(..)` constructor, creating a new instance of `EventTarget`."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/EventTarget)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `EventTarget`*"]
21 pub fn new() -> Result<EventTarget, JsValue>;
22 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = addEventListener)]
23 #[doc = "The `addEventListener()` method."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `EventTarget`*"]
28 pub fn add_event_listener_with_callback(
29 this: &EventTarget,
30 type_: &str,
31 listener: &::js_sys::Function,
32 ) -> Result<(), JsValue>;
33 #[cfg(feature = "EventListener")]
34 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = addEventListener)]
35 #[doc = "The `addEventListener()` method."]
36 #[doc = ""]
37 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)"]
38 #[doc = ""]
39 #[doc = "*This API requires the following crate features to be activated: `EventListener`, `EventTarget`*"]
40 pub fn add_event_listener_with_event_listener(
41 this: &EventTarget,
42 type_: &str,
43 listener: &EventListener,
44 ) -> Result<(), JsValue>;
45 #[cfg(feature = "AddEventListenerOptions")]
46 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = addEventListener)]
47 #[doc = "The `addEventListener()` method."]
48 #[doc = ""]
49 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)"]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`, `EventTarget`*"]
52 pub fn add_event_listener_with_callback_and_add_event_listener_options(
53 this: &EventTarget,
54 type_: &str,
55 listener: &::js_sys::Function,
56 options: &AddEventListenerOptions,
57 ) -> Result<(), JsValue>;
58 #[cfg(all(feature = "AddEventListenerOptions", feature = "EventListener",))]
59 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = addEventListener)]
60 #[doc = "The `addEventListener()` method."]
61 #[doc = ""]
62 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)"]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`, `EventListener`, `EventTarget`*"]
65 pub fn add_event_listener_with_event_listener_and_add_event_listener_options(
66 this: &EventTarget,
67 type_: &str,
68 listener: &EventListener,
69 options: &AddEventListenerOptions,
70 ) -> Result<(), JsValue>;
71 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = addEventListener)]
72 #[doc = "The `addEventListener()` method."]
73 #[doc = ""]
74 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)"]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `EventTarget`*"]
77 pub fn add_event_listener_with_callback_and_bool(
78 this: &EventTarget,
79 type_: &str,
80 listener: &::js_sys::Function,
81 options: bool,
82 ) -> Result<(), JsValue>;
83 #[cfg(feature = "EventListener")]
84 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = addEventListener)]
85 #[doc = "The `addEventListener()` method."]
86 #[doc = ""]
87 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)"]
88 #[doc = ""]
89 #[doc = "*This API requires the following crate features to be activated: `EventListener`, `EventTarget`*"]
90 pub fn add_event_listener_with_event_listener_and_bool(
91 this: &EventTarget,
92 type_: &str,
93 listener: &EventListener,
94 options: bool,
95 ) -> Result<(), JsValue>;
96 #[cfg(feature = "AddEventListenerOptions")]
97 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = addEventListener)]
98 #[doc = "The `addEventListener()` method."]
99 #[doc = ""]
100 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)"]
101 #[doc = ""]
102 #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`, `EventTarget`*"]
103 pub fn add_event_listener_with_callback_and_add_event_listener_options_and_wants_untrusted(
104 this: &EventTarget,
105 type_: &str,
106 listener: &::js_sys::Function,
107 options: &AddEventListenerOptions,
108 wants_untrusted: Option<bool>,
109 ) -> Result<(), JsValue>;
110 #[cfg(all(feature = "AddEventListenerOptions", feature = "EventListener",))]
111 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = addEventListener)]
112 #[doc = "The `addEventListener()` method."]
113 #[doc = ""]
114 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)"]
115 #[doc = ""]
116 #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`, `EventListener`, `EventTarget`*"]
117 pub fn add_event_listener_with_event_listener_and_add_event_listener_options_and_wants_untrusted(
118 this: &EventTarget,
119 type_: &str,
120 listener: &EventListener,
121 options: &AddEventListenerOptions,
122 wants_untrusted: Option<bool>,
123 ) -> Result<(), JsValue>;
124 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = addEventListener)]
125 #[doc = "The `addEventListener()` method."]
126 #[doc = ""]
127 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)"]
128 #[doc = ""]
129 #[doc = "*This API requires the following crate features to be activated: `EventTarget`*"]
130 pub fn add_event_listener_with_callback_and_bool_and_wants_untrusted(
131 this: &EventTarget,
132 type_: &str,
133 listener: &::js_sys::Function,
134 options: bool,
135 wants_untrusted: Option<bool>,
136 ) -> Result<(), JsValue>;
137 #[cfg(feature = "EventListener")]
138 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = addEventListener)]
139 #[doc = "The `addEventListener()` method."]
140 #[doc = ""]
141 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)"]
142 #[doc = ""]
143 #[doc = "*This API requires the following crate features to be activated: `EventListener`, `EventTarget`*"]
144 pub fn add_event_listener_with_event_listener_and_bool_and_wants_untrusted(
145 this: &EventTarget,
146 type_: &str,
147 listener: &EventListener,
148 options: bool,
149 wants_untrusted: Option<bool>,
150 ) -> Result<(), JsValue>;
151 #[cfg(feature = "Event")]
152 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = dispatchEvent)]
153 #[doc = "The `dispatchEvent()` method."]
154 #[doc = ""]
155 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/dispatchEvent)"]
156 #[doc = ""]
157 #[doc = "*This API requires the following crate features to be activated: `Event`, `EventTarget`*"]
158 pub fn dispatch_event(this: &EventTarget, event: &Event) -> Result<bool, JsValue>;
159 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = removeEventListener)]
160 #[doc = "The `removeEventListener()` method."]
161 #[doc = ""]
162 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)"]
163 #[doc = ""]
164 #[doc = "*This API requires the following crate features to be activated: `EventTarget`*"]
165 pub fn remove_event_listener_with_callback(
166 this: &EventTarget,
167 type_: &str,
168 listener: &::js_sys::Function,
169 ) -> Result<(), JsValue>;
170 #[cfg(feature = "EventListener")]
171 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = removeEventListener)]
172 #[doc = "The `removeEventListener()` method."]
173 #[doc = ""]
174 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)"]
175 #[doc = ""]
176 #[doc = "*This API requires the following crate features to be activated: `EventListener`, `EventTarget`*"]
177 pub fn remove_event_listener_with_event_listener(
178 this: &EventTarget,
179 type_: &str,
180 listener: &EventListener,
181 ) -> Result<(), JsValue>;
182 #[cfg(feature = "EventListenerOptions")]
183 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = removeEventListener)]
184 #[doc = "The `removeEventListener()` method."]
185 #[doc = ""]
186 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)"]
187 #[doc = ""]
188 #[doc = "*This API requires the following crate features to be activated: `EventListenerOptions`, `EventTarget`*"]
189 pub fn remove_event_listener_with_callback_and_event_listener_options(
190 this: &EventTarget,
191 type_: &str,
192 listener: &::js_sys::Function,
193 options: &EventListenerOptions,
194 ) -> Result<(), JsValue>;
195 #[cfg(all(feature = "EventListener", feature = "EventListenerOptions",))]
196 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = removeEventListener)]
197 #[doc = "The `removeEventListener()` method."]
198 #[doc = ""]
199 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)"]
200 #[doc = ""]
201 #[doc = "*This API requires the following crate features to be activated: `EventListener`, `EventListenerOptions`, `EventTarget`*"]
202 pub fn remove_event_listener_with_event_listener_and_event_listener_options(
203 this: &EventTarget,
204 type_: &str,
205 listener: &EventListener,
206 options: &EventListenerOptions,
207 ) -> Result<(), JsValue>;
208 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = removeEventListener)]
209 #[doc = "The `removeEventListener()` method."]
210 #[doc = ""]
211 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)"]
212 #[doc = ""]
213 #[doc = "*This API requires the following crate features to be activated: `EventTarget`*"]
214 pub fn remove_event_listener_with_callback_and_bool(
215 this: &EventTarget,
216 type_: &str,
217 listener: &::js_sys::Function,
218 options: bool,
219 ) -> Result<(), JsValue>;
220 #[cfg(feature = "EventListener")]
221 # [wasm_bindgen (catch , method , structural , js_class = "EventTarget" , js_name = removeEventListener)]
222 #[doc = "The `removeEventListener()` method."]
223 #[doc = ""]
224 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)"]
225 #[doc = ""]
226 #[doc = "*This API requires the following crate features to be activated: `EventListener`, `EventTarget`*"]
227 pub fn remove_event_listener_with_event_listener_and_bool(
228 this: &EventTarget,
229 type_: &str,
230 listener: &EventListener,
231 options: bool,
232 ) -> Result<(), JsValue>;
233}
234