1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = MouseEvent , extends = UiEvent , extends = Event , extends = :: js_sys :: Object , js_name = DragEvent , typescript_type = "DragEvent")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `DragEvent` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `DragEvent`*"]
13 pub type DragEvent;
14 #[cfg(feature = "DataTransfer")]
15 # [wasm_bindgen (structural , method , getter , js_class = "DragEvent" , js_name = dataTransfer)]
16 #[doc = "Getter for the `dataTransfer` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/dataTransfer)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `DragEvent`*"]
21 pub fn data_transfer(this: &DragEvent) -> Option<DataTransfer>;
22 #[wasm_bindgen(catch, constructor, js_class = "DragEvent")]
23 #[doc = "The `new DragEvent(..)` constructor, creating a new instance of `DragEvent`."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `DragEvent`*"]
28 pub fn new(type_: &str) -> Result<DragEvent, JsValue>;
29 #[cfg(feature = "DragEventInit")]
30 #[wasm_bindgen(catch, constructor, js_class = "DragEvent")]
31 #[doc = "The `new DragEvent(..)` constructor, creating a new instance of `DragEvent`."]
32 #[doc = ""]
33 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)"]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `DragEventInit`*"]
36 pub fn new_with_event_init_dict(
37 type_: &str,
38 event_init_dict: &DragEventInit,
39 ) -> Result<DragEvent, JsValue>;
40 # [wasm_bindgen (method , structural , js_class = "DragEvent" , js_name = initDragEvent)]
41 #[doc = "The `initDragEvent()` method."]
42 #[doc = ""]
43 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `DragEvent`*"]
46 pub fn init_drag_event(this: &DragEvent, type_: &str);
47 # [wasm_bindgen (method , structural , js_class = "DragEvent" , js_name = initDragEvent)]
48 #[doc = "The `initDragEvent()` method."]
49 #[doc = ""]
50 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `DragEvent`*"]
53 pub fn init_drag_event_with_can_bubble(this: &DragEvent, type_: &str, can_bubble: bool);
54 # [wasm_bindgen (method , structural , js_class = "DragEvent" , js_name = initDragEvent)]
55 #[doc = "The `initDragEvent()` method."]
56 #[doc = ""]
57 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `DragEvent`*"]
60 pub fn init_drag_event_with_can_bubble_and_cancelable(
61 this: &DragEvent,
62 type_: &str,
63 can_bubble: bool,
64 cancelable: bool,
65 );
66 #[cfg(feature = "Window")]
67 # [wasm_bindgen (method , structural , js_class = "DragEvent" , js_name = initDragEvent)]
68 #[doc = "The `initDragEvent()` method."]
69 #[doc = ""]
70 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
73 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view(
74 this: &DragEvent,
75 type_: &str,
76 can_bubble: bool,
77 cancelable: bool,
78 a_view: Option<&Window>,
79 );
80 #[cfg(feature = "Window")]
81 # [wasm_bindgen (method , structural , js_class = "DragEvent" , js_name = initDragEvent)]
82 #[doc = "The `initDragEvent()` method."]
83 #[doc = ""]
84 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
85 #[doc = ""]
86 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
87 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail(
88 this: &DragEvent,
89 type_: &str,
90 can_bubble: bool,
91 cancelable: bool,
92 a_view: Option<&Window>,
93 a_detail: i32,
94 );
95 #[cfg(feature = "Window")]
96 # [wasm_bindgen (method , structural , js_class = "DragEvent" , js_name = initDragEvent)]
97 #[doc = "The `initDragEvent()` method."]
98 #[doc = ""]
99 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
100 #[doc = ""]
101 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
102 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x(
103 this: &DragEvent,
104 type_: &str,
105 can_bubble: bool,
106 cancelable: bool,
107 a_view: Option<&Window>,
108 a_detail: i32,
109 a_screen_x: i32,
110 );
111 #[cfg(feature = "Window")]
112 # [wasm_bindgen (method , structural , js_class = "DragEvent" , js_name = initDragEvent)]
113 #[doc = "The `initDragEvent()` method."]
114 #[doc = ""]
115 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
116 #[doc = ""]
117 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
118 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y(
119 this: &DragEvent,
120 type_: &str,
121 can_bubble: bool,
122 cancelable: bool,
123 a_view: Option<&Window>,
124 a_detail: i32,
125 a_screen_x: i32,
126 a_screen_y: i32,
127 );
128 #[cfg(feature = "Window")]
129 # [wasm_bindgen (method , structural , js_class = "DragEvent" , js_name = initDragEvent)]
130 #[doc = "The `initDragEvent()` method."]
131 #[doc = ""]
132 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
133 #[doc = ""]
134 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
135 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x(
136 this: &DragEvent,
137 type_: &str,
138 can_bubble: bool,
139 cancelable: bool,
140 a_view: Option<&Window>,
141 a_detail: i32,
142 a_screen_x: i32,
143 a_screen_y: i32,
144 a_client_x: i32,
145 );
146 #[cfg(feature = "Window")]
147 # [wasm_bindgen (method , structural , js_class = "DragEvent" , js_name = initDragEvent)]
148 #[doc = "The `initDragEvent()` method."]
149 #[doc = ""]
150 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
151 #[doc = ""]
152 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
153 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x_and_a_client_y(
154 this: &DragEvent,
155 type_: &str,
156 can_bubble: bool,
157 cancelable: bool,
158 a_view: Option<&Window>,
159 a_detail: i32,
160 a_screen_x: i32,
161 a_screen_y: i32,
162 a_client_x: i32,
163 a_client_y: i32,
164 );
165 #[cfg(feature = "Window")]
166 # [wasm_bindgen (method , structural , js_class = "DragEvent" , js_name = initDragEvent)]
167 #[doc = "The `initDragEvent()` method."]
168 #[doc = ""]
169 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
170 #[doc = ""]
171 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
172 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x_and_a_client_y_and_a_ctrl_key(
173 this: &DragEvent,
174 type_: &str,
175 can_bubble: bool,
176 cancelable: bool,
177 a_view: Option<&Window>,
178 a_detail: i32,
179 a_screen_x: i32,
180 a_screen_y: i32,
181 a_client_x: i32,
182 a_client_y: i32,
183 a_ctrl_key: bool,
184 );
185 #[cfg(feature = "Window")]
186 # [wasm_bindgen (method , structural , js_class = "DragEvent" , js_name = initDragEvent)]
187 #[doc = "The `initDragEvent()` method."]
188 #[doc = ""]
189 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
190 #[doc = ""]
191 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
192 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x_and_a_client_y_and_a_ctrl_key_and_a_alt_key(
193 this: &DragEvent,
194 type_: &str,
195 can_bubble: bool,
196 cancelable: bool,
197 a_view: Option<&Window>,
198 a_detail: i32,
199 a_screen_x: i32,
200 a_screen_y: i32,
201 a_client_x: i32,
202 a_client_y: i32,
203 a_ctrl_key: bool,
204 a_alt_key: bool,
205 );
206 #[cfg(feature = "Window")]
207 # [wasm_bindgen (method , structural , js_class = "DragEvent" , js_name = initDragEvent)]
208 #[doc = "The `initDragEvent()` method."]
209 #[doc = ""]
210 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
211 #[doc = ""]
212 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
213 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x_and_a_client_y_and_a_ctrl_key_and_a_alt_key_and_a_shift_key(
214 this: &DragEvent,
215 type_: &str,
216 can_bubble: bool,
217 cancelable: bool,
218 a_view: Option<&Window>,
219 a_detail: i32,
220 a_screen_x: i32,
221 a_screen_y: i32,
222 a_client_x: i32,
223 a_client_y: i32,
224 a_ctrl_key: bool,
225 a_alt_key: bool,
226 a_shift_key: bool,
227 );
228 #[cfg(feature = "Window")]
229 # [wasm_bindgen (method , structural , js_class = "DragEvent" , js_name = initDragEvent)]
230 #[doc = "The `initDragEvent()` method."]
231 #[doc = ""]
232 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
233 #[doc = ""]
234 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
235 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x_and_a_client_y_and_a_ctrl_key_and_a_alt_key_and_a_shift_key_and_a_meta_key(
236 this: &DragEvent,
237 type_: &str,
238 can_bubble: bool,
239 cancelable: bool,
240 a_view: Option<&Window>,
241 a_detail: i32,
242 a_screen_x: i32,
243 a_screen_y: i32,
244 a_client_x: i32,
245 a_client_y: i32,
246 a_ctrl_key: bool,
247 a_alt_key: bool,
248 a_shift_key: bool,
249 a_meta_key: bool,
250 );
251 #[cfg(feature = "Window")]
252 # [wasm_bindgen (method , structural , js_class = "DragEvent" , js_name = initDragEvent)]
253 #[doc = "The `initDragEvent()` method."]
254 #[doc = ""]
255 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
256 #[doc = ""]
257 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `Window`*"]
258 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x_and_a_client_y_and_a_ctrl_key_and_a_alt_key_and_a_shift_key_and_a_meta_key_and_a_button(
259 this: &DragEvent,
260 type_: &str,
261 can_bubble: bool,
262 cancelable: bool,
263 a_view: Option<&Window>,
264 a_detail: i32,
265 a_screen_x: i32,
266 a_screen_y: i32,
267 a_client_x: i32,
268 a_client_y: i32,
269 a_ctrl_key: bool,
270 a_alt_key: bool,
271 a_shift_key: bool,
272 a_meta_key: bool,
273 a_button: u16,
274 );
275 #[cfg(all(feature = "EventTarget", feature = "Window",))]
276 # [wasm_bindgen (method , structural , js_class = "DragEvent" , js_name = initDragEvent)]
277 #[doc = "The `initDragEvent()` method."]
278 #[doc = ""]
279 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
280 #[doc = ""]
281 #[doc = "*This API requires the following crate features to be activated: `DragEvent`, `EventTarget`, `Window`*"]
282 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x_and_a_client_y_and_a_ctrl_key_and_a_alt_key_and_a_shift_key_and_a_meta_key_and_a_button_and_a_related_target(
283 this: &DragEvent,
284 type_: &str,
285 can_bubble: bool,
286 cancelable: bool,
287 a_view: Option<&Window>,
288 a_detail: i32,
289 a_screen_x: i32,
290 a_screen_y: i32,
291 a_client_x: i32,
292 a_client_y: i32,
293 a_ctrl_key: bool,
294 a_alt_key: bool,
295 a_shift_key: bool,
296 a_meta_key: bool,
297 a_button: u16,
298 a_related_target: Option<&EventTarget>,
299 );
300 #[cfg(all(feature = "DataTransfer", feature = "EventTarget", feature = "Window",))]
301 # [wasm_bindgen (method , structural , js_class = "DragEvent" , js_name = initDragEvent)]
302 #[doc = "The `initDragEvent()` method."]
303 #[doc = ""]
304 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/initDragEvent)"]
305 #[doc = ""]
306 #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `DragEvent`, `EventTarget`, `Window`*"]
307 pub fn init_drag_event_with_can_bubble_and_cancelable_and_a_view_and_a_detail_and_a_screen_x_and_a_screen_y_and_a_client_x_and_a_client_y_and_a_ctrl_key_and_a_alt_key_and_a_shift_key_and_a_meta_key_and_a_button_and_a_related_target_and_a_data_transfer(
308 this: &DragEvent,
309 type_: &str,
310 can_bubble: bool,
311 cancelable: bool,
312 a_view: Option<&Window>,
313 a_detail: i32,
314 a_screen_x: i32,
315 a_screen_y: i32,
316 a_client_x: i32,
317 a_client_y: i32,
318 a_ctrl_key: bool,
319 a_alt_key: bool,
320 a_shift_key: bool,
321 a_meta_key: bool,
322 a_button: u16,
323 a_related_target: Option<&EventTarget>,
324 a_data_transfer: Option<&DataTransfer>,
325 );
326}