web_sys/features/
gen_DragEvent.rs

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